argoproj-labs / argocd-image-updater

Automatic container image update for Argo CD
https://argocd-image-updater.readthedocs.io/en/stable/
Apache License 2.0
1.25k stars 258 forks source link

Inconsistent semver return results #508

Open michalschott opened 1 year ago

michalschott commented 1 year ago

Describe the bug

Assuming two tags are being pointed to the same image SHA (see attached screenshot)

Zrzut ekranu 2022-12-23 o 09 50 48

/usr/local/bin $ ./argocd-image-updater test quay.io/fairwinds/polaris --semver-constraint 7.2.x | grep "latest image"
time="2022-12-23T08:48:22Z" level=info msg="latest image according to constraint is quay.io/fairwinds/polaris:7.2" application=test image_alias= image_name=quay.io/fairwinds/polaris registry_url=quay.io
/usr/local/bin $ ./argocd-image-updater test quay.io/fairwinds/polaris --semver-constraint 7.2.x | grep "latest image"
time="2022-12-23T08:48:27Z" level=info msg="latest image according to constraint is quay.io/fairwinds/polaris:7.2.0" application=test image_alias= image_name=quay.io/fairwinds/polaris registry_url=quay.io
/usr/local/bin $

With constraint set to 7.2.x I would expect always having 7.2.0 as a return tag.

Version

/usr/local/bin $ ./argocd-image-updater version
argocd-image-updater: v0.12.1+16cff2e
  BuildDate: 2022-12-06T23:42:50Z
  GitCommit: 16cff2e66bcce86ba3ba034788ab5cbf18d8ed88
  GoVersion: go1.17.8
  GoCompiler: gc
  Platform: linux/amd64
jannfis commented 1 year ago

This is actually a duplicate of #375 I think.