argocd-image-updater icon indicating copy to clipboard operation
argocd-image-updater copied to clipboard

Invalid Semantic Version

Open tomjohnburton opened this issue 3 years ago • 2 comments

Describe the bug No matter what I set in the annotation, I always get the same error

rgocd-argocd-image-updater-7d468c5bdd-vpnr5 argocd-image-updater time="2022-09-21T13:47:53Z" level=info msg="Starting image update cycle, considering 1 annotated application(s) for update"
argocd-argocd-image-updater-7d468c5bdd-vpnr5 argocd-image-updater time="2022-09-21T13:47:55Z" level=error msg="Unable to find newest version from available tags: Invalid Semantic Version" alias=stake application=stake image_name=REDACTED/stake image_tag=latest registry=REDACTED

To Reproduce Set your annotations like so:

    argocd-image-updater.argoproj.io/image-list: stake=REDACTED/stake:0.x
    argocd-image-updater.argoproj.io/stake.helm.image-name: image.repository

Expected behavior Image should be updated. Can confirm we have an image that meets the spec

Additional context Add any other context about the problem here.

Version Please tell us about the version you encountered the issue with

quay.io/argoprojlabs/argocd-image-updater:v0.12.0

Logs

argocd-argocd-image-updater-869cdc7f47-xk2mt argocd-image-updater time="2022-09-21T14:48:10Z" level=debug msg="Using version constraint 'v0.x' when looking for a new tag" alias=stake application=stake image_name=REDACTED image_tag=latest registry=ghcr.io
argocd-argocd-image-updater-869cdc7f47-xk2mt argocd-image-updater time="2022-09-21T14:48:12Z" level=error msg="Unable to find newest version from available tags: Invalid Semantic Version" alias=stake application=stake image_name=REDACTED/stake image_tag=latest registry=ghcr.io

tomjohnburton avatar Sep 21 '22 13:09 tomjohnburton

Something strange happened

With the following config:

    argocd-image-updater.argoproj.io/image-list: stake=REDACTED/stake:v0.1.x
    argocd-image-updater.argoproj.io/stake.update-strategy: semver
    argocd-image-updater.argoproj.io/stake.allow-tags: regexp:^v.*$
    argocd-image-updater.argoproj.io/stake.helm.image-name: image.repository

it worked.

 msg="Using version constraint 'v0.1.x' when looking for a new tag"
level=debug msg="found 16 from 19 tags eligible for consideration"

And then it stopped working. What I realised is that if the tag is set to a default latest, the image updater fails. I presume it's passing the current tag and failing there.

i.e. works

    parameters:
      - name: image.tag
        value: v0.1.15
        forceString: true

breaks

    parameters:
      - name: image.tag
        value: latest
        forceString: true

tomjohnburton avatar Sep 21 '22 15:09 tomjohnburton