Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using -SNAPSHOT prevents rebuilding past commits #1878

Closed
doru1004 opened this issue Jan 5, 2021 · 6 comments
Closed

Using -SNAPSHOT prevents rebuilding past commits #1878

doru1004 opened this issue Jan 5, 2021 · 6 comments

Comments

@doru1004
Copy link
Contributor

doru1004 commented Jan 5, 2021

I am currently trying to trace down an error and I am hitting an interesting problem.

I am trying to figure out which commit introduced the error but since past commits explicitly use the 1.6.0-SNAPSHOT (which doesn't exist anymore), this prevents me from actually rebuilding older versions of camel-k.

It would be good to avoid the direct use of versions which contain the SNAPSHOT tag in them. I'm not sure I have a solution for how to avoid that but one thing is for sure, whatever the name, we must ensure that the package exists under maven even after the SNAPSHOT tag has moved to a new version.

@doru1004 doru1004 changed the title Using -SNAPSHOT prevents use of git bisect Using -SNAPSHOT prevents rebuilding past commits Jan 5, 2021
@nicolaferraro
Copy link
Member

Yeah, from time to time we need to switch to SNAPSHOT to refer to the runtime artifacts. I've added to the local run comands the --maven-repository option so that it's possible to reference https://repository.apache.org/content/repositories/snapshots even in kamel local run, and it contains the snapshot artifacts, compiled from the runtime master.

Unfortunately, we can't publish on maven central unreleased bits automatically, because we need to start a vote on Apache and let the community tests artifacts for 72 hours before releasing anything on Maven. So we opted on using SNAPSHOTs, usually for short period of times, to sync operator and runtime and move both forward.

@johnpoth
Copy link
Member

@nicolaferraro is there an easy way to run an integration using locally built SNAPSHOTs of camel-k-runtime ?

@nicolaferraro
Copy link
Member

@nicolaferraro is there an easy way to run an integration using locally built SNAPSHOTs of camel-k-runtime ?

Local run uses local maven, so I guess it will pick your compiled version. It wouldn't work with the released version, but if you build a kamel with runtime-version set to x.x.x-SNAPSHOT in the Makefile (plus make codegen before make), then kamel local run will pick your local runtime.

@johnpoth
Copy link
Member

Thanks @nicolaferraro! I was thinking of running it in Kubernetes but maybe running it locally will be enough, thanks!

@doru1004
Copy link
Contributor Author

I guess my question is, is it needed to go through a phase where -SNAPSHOT is used?

Instead of using 1.6.0-SNAPSHOT, one could advance the SNAPSHOT tag of the other project to something like 1.6.1-SNAPSHOT thus leaving 1.6.0 to not have a SNAPSHOT tag. Then Camel-K will have no mention of SNAPSHOT in its source code. If we then need to use the latest 1.6.1-SNAPSHOT, we first move the SNAPSHOT to 1.6.2-SNAPSHOT and then use 1.6.1 in Camel-K and so on.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants