Closed der-eismann closed 1 year ago
Okay, just to keep this going, executing a git status
in the container build gives this output:
I'm pretty sure #12620 caused this, as the whole issue disappears when I revert c6f32e5b0823fd08ec905198ae75efe247b4d2c6. 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?
. 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 dirty
. I'd prefer to not revert #12620 though.
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?
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):
docker run --rm -ti --entrypoint /bin/bash quay.io/argoproj/argocd:v2.7.7
Unable to find image 'quay.io/argoproj/argocd:v2.7.7' locally
v2.7.7: Pulling from argoproj/argocd
952b15bbc7fb: Pull complete
46d90b46e703: Pull complete
99577c2fab9f: Pull complete
c80220957225: Pull complete
f1bec800a21e: Pull complete
7a5e720de2c2: Pull complete
9413d6cca847: Pull complete
1281a6d994b6: Pull complete
df609e71ce68: Pull complete
a8b7ddc72922: Pull complete
4f4fb700ef54: Pull complete
b011542671bb: Pull complete
75136a03ff4d: Pull complete
676053717082: Pull complete
Digest: sha256:6a5d0e909b6ad106cef2b7ce73df509b09dc33da9c27e69775c8777084554c52
Status: Downloaded newer image for quay.io/argoproj/argocd:v2.7.7
argocd@9ce44bf40bfc:~$ argocd version
argocd: v2.7.7+4650bb2.dirty
BuildDate: 2023-07-05T19:42:32Z
GitCommit: 4650bb2817c3c81405f40cf77e93ef2b5fb275fb
GitTreeState: dirty
GoVersion: go1.19.10
Compiler: gc
Platform: linux/arm64
The problem is still existing in 2.7.11 still shows as dirty.
The same issue exists even in the latest published version of 2.7 (2.7.18).
docker run --rm -ti --entrypoint /bin/bash quay.io/argoproj/argocd:v2.7.18
Unable to find image 'quay.io/argoproj/argocd:v2.7.18' locally
v2.7.18: Pulling from argoproj/argocd
3153aa388d02: Pull complete
6cfb943d3e64: Pull complete
4c74480df836: Pull complete
309c04725700: Pull complete
fab8b034460f: Pull complete
b8ad31916d2c: Pull complete
ef9cabf1fa21: Pull complete
721a9fa9b633: Pull complete
649c1bbebd26: Pull complete
c1bdfcb2ae13: Pull complete
4f4fb700ef54: Pull complete
2dd62d7fa1cb: Pull complete
2211924e3d22: Pull complete
9df39a89fbc2: Pull complete
Digest: sha256:249041f7463aaa0fb25e63aa504bfc670e8040ca1d7066935990c76f8988b4b9
Status: Downloaded newer image for quay.io/argoproj/argocd:v2.7.18
argocd@5f82a8ac9899:~$ argocd version
argocd: v2.7.18+f45ef02.dirty
BuildDate: 2024-04-04T22:47:46Z
GitCommit: f45ef020d6a8e50c225a99573a662e034036b833
GitTreeState: dirty
GoVersion: go1.20.10
Compiler: gc
Platform: linux/amd64
FATA[0000] Argo CD server address unspecified
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