-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Container images for 2.7.x are reporting a dirty
version
#13683
Comments
Okay, just to keep this going, executing a git status output
I'm pretty sure #12620 caused this, as the whole issue disappears when I revert c6f32e5. Also it doesn't bring any improvement regarding image size since in the last step only the binaries are copied to the final image, nothing else. It might improve local development speed, but this is not a very good solution then. I would propose to revert #12620, do you have an opinion on that @blakepettersson? |
Yes. I see the value for GA versions to not have |
I haven't dug into the code... is there a way to get the local dev env win but still fix the tag issue when we push a release? |
We could filter out tests, docs etc from the Makefile, I think this could work GIT_TAG=$(shell if [ -z "`git status --porcelain | grep -vE '(test|docs|hack|examples|manifests|.github)'`" ]; then git describe --exact-match --tags HEAD 2>/dev/null; fi)
GIT_TREE_STATE=$(shell if [ -z "`git status --porcelain | grep -vE '(test|docs|hack|examples|manifests|.github)`" ]; then echo "clean" ; else echo "dirty"; fi) Another option could be to filter on deleted entries GIT_TAG=$(shell if [ -z "`git status --porcelain | grep -v '^D'`" ]; then git describe --exact-match --tags HEAD 2>/dev/null; fi)
GIT_TREE_STATE=$(shell if [ -z "`git status --porcelain | grep -v '^D'`" ]; then echo "clean" ; else echo "dirty"; fi) WDYT @crenshaw-dev? |
Add the ability to specify `GIT_TAG`, `GIT_COMMIT`, `BUILD_DATE` and `GIT_TREE_STATE` as optional build-args. As well as resolving argoproj#13683 (which was caused by argoproj#12620), this has the bonus of making the `docker build` slightly more deterministic (since we now have the ability to specify the same inputs into the docker build which was hitherto computed on every `docker build`). Signed-off-by: Blake Pettersson <[email protected]>
* build: add build-args for git-commit etc Add the ability to specify `GIT_TAG`, `GIT_COMMIT`, `BUILD_DATE` and `GIT_TREE_STATE` as optional build-args. As well as resolving #13683 (which was caused by #12620), this has the bonus of making the `docker build` slightly more deterministic (since we now have the ability to specify the same inputs into the docker build which was hitherto computed on every `docker build`). Signed-off-by: Blake Pettersson <[email protected]> * Update .github/workflows/image-reuse.yaml Co-authored-by: Josh Soref <[email protected]> Signed-off-by: Blake Pettersson <[email protected]> --------- Signed-off-by: Blake Pettersson <[email protected]> Co-authored-by: Josh Soref <[email protected]>
Fixed by #14114 |
Thanks for fixing, highly appreciated! |
Edit: I see now that these changes didn't make it into the 2.7.7 release. I should've verified before asking, sorry about that! It looks like we're still running into the same issue in the latest version (2.7.7):
|
@jesserhodes-expel it seems like the change never went into 2.7.x (i.e it was never cherry-picked into that branch). See the difference between 2.7.7 and 2.8.0-rc3. |
* build: add build-args for git-commit etc Add the ability to specify `GIT_TAG`, `GIT_COMMIT`, `BUILD_DATE` and `GIT_TREE_STATE` as optional build-args. As well as resolving argoproj#13683 (which was caused by argoproj#12620), this has the bonus of making the `docker build` slightly more deterministic (since we now have the ability to specify the same inputs into the docker build which was hitherto computed on every `docker build`). Signed-off-by: Blake Pettersson <[email protected]> * Update .github/workflows/image-reuse.yaml Co-authored-by: Josh Soref <[email protected]> Signed-off-by: Blake Pettersson <[email protected]> --------- Signed-off-by: Blake Pettersson <[email protected]> Co-authored-by: Josh Soref <[email protected]>
The problem is still existing in 2.7.11 still shows as dirty. |
* build: add build-args for git-commit etc Add the ability to specify `GIT_TAG`, `GIT_COMMIT`, `BUILD_DATE` and `GIT_TREE_STATE` as optional build-args. As well as resolving argoproj#13683 (which was caused by argoproj#12620), this has the bonus of making the `docker build` slightly more deterministic (since we now have the ability to specify the same inputs into the docker build which was hitherto computed on every `docker build`). Signed-off-by: Blake Pettersson <[email protected]> * Update .github/workflows/image-reuse.yaml Co-authored-by: Josh Soref <[email protected]> Signed-off-by: Blake Pettersson <[email protected]> --------- Signed-off-by: Blake Pettersson <[email protected]> Co-authored-by: Josh Soref <[email protected]>
The same issue exists even in the latest published version of 2.7 (2.7.18).
|
As Blake Pettersson said above, the change didn't make it to the 2.7 branch, it's working correctly from 2.8 onwards. It's not really a critical issue and 2.7 is not supported anymore anyway. |
Checklist:
argocd version
.Describe the bug
After upgrading from ArgoCD 2.6.7 to 2.7.2, the UI and CLI are reporting the version as
v2.7.2+cbee7e6.dirty
. This is probably just a small error during the CI process, but could also mean that the contents of the Git repository were modified during the build process. This started happening with 2.7.0, 2.6.7 was still fine.To Reproduce
Just start the
quay.io/argoproj/argocd:v2.7.2
container image and executeargocd version
.Expected behavior
Version should be reported as
v2.7.2+cbee7e6
without thedirty
tag.Screenshots
Version
Logs
Should be irrelevant
The text was updated successfully, but these errors were encountered: