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

Bug: Reading tags from GitHub Container registry causes panic #755

Closed
abatilo opened this issue Jun 22, 2024 · 3 comments · Fixed by #759
Closed

Bug: Reading tags from GitHub Container registry causes panic #755

abatilo opened this issue Jun 22, 2024 · 3 comments · Fixed by #759
Labels
bug Something isn't working

Comments

@abatilo
Copy link

abatilo commented Jun 22, 2024

Describe the bug
Between v0.12.2 and v0.13.1, using the latest tag on a ghcr repo causes a panic.

To Reproduce
The following kind: Application works on v0.12.2 but fails on v0.13.1

---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: blog
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
  annotations:
    argocd-image-updater.argoproj.io/write-back-method: git
    argocd-image-updater.argoproj.io/write-back-target: kustomization
    argocd-image-updater.argoproj.io/image-list: app=ghcr.io/abatilo/blog
    argocd-image-updater.argoproj.io/app.update-strategy: latest
    argocd-image-updater.argoproj.io/app.ignore-tags: latest
    argocd-image-updater.argoproj.io/git-branch: main
spec:
  project: default

  source:
    repoURL: https://github.com/mentallyanimated/deployments.git
    targetRevision: HEAD
    path: blog/base
    kustomize:

  destination:
    server: https://kubernetes.default.svc
    namespace: default

  syncPolicy:
    automated:
      prune: true
      selfHeal: true
      allowEmpty: false

Expected behavior
I expect argocd-image-updater not to panic while looking for new tags

Additional context
This container image is public and can be found here

Version
v0.13.1

Logs
Here are trace level logs:

argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=debug msg="Processing application blog"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=debug msg="Considering this image for update" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=debug msg="setting rate limit to 20 requests per second" prefix=ghcr.io registry="https://ghcr.io"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=debug msg="Inferred registry from prefix ghcr.io to use API https://ghcr.io"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=debug msg="Using no version constraint when looking for a new tag" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Found update strategy latest" image_alias=app image_name=ghcr.io/abatilo/blog registry_url=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=warning msg="\"latest\" strategy has been renamed to \"newest-build\". Please switch to the new convention as support for the old naming convention will be removed in future versions." image_alias=app image_name=ghcr.io/abatilo/blog registry_url=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="No match annotation found" image_alias=app image_name=ghcr.io/abatilo/blog registry_url=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Using runtime platform constraint linux/amd64" image_alias=app image_name=ghcr.io/abatilo/blog registry_url=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="No pull-secret annotation found" image_alias=app image_name=ghcr.io/abatilo/blog registry_url=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/tags/list"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:20220211-12cf26b (operation 1/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:20220227-db53d36 (operation 2/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:20220403-db53d36 (operation 3/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:20220409-676fc46 (operation 4/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:sha-abb4f34 (operation 5/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:sha-634afd8 (operation 6/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:634afd8 (operation 7/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:80d1ac9 (operation 8/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:5abed12 (operation 9/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:ca47f2b (operation 10/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:b68a77c (operation 11/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:ea41089 (operation 12/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:a847504 (operation 13/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:d5c96d4 (operation 14/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:buildcache (operation 15/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:d3668aa (operation 16/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:35ada8b (operation 17/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:fa03593 (operation 18/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:4dadc19 (operation 19/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:3f4c95b (operation 20/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="acquired metadata semaphore" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Getting manifest for image abatilo/blog:75dc045 (operation 21/50)" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/3f4c95b"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/20220211-12cf26b"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/20220227-db53d36"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/20220403-db53d36"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/20220409-676fc46"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/sha-abb4f34"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is 7a054c760f0321464cdf4da506ba18fbb037b6bf2671aa51c62bdd6254092606" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:cb7e5bc8c24ec4931f810458255ca822a3e238d88b954655391e754f99d5e2dd" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/sha-634afd8"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is a40948f5c8696117ee73d16a0ea1ffd1a1e1aff41db34eea65493ee868f75cf0" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:eac772b83f2ceed5ff26a31608a4090d673fb43f3132400c8b91e6669ef3fe6a" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is 9b9437abd832b62fd6b5f25ee64211ad64a63d4fa6ac5212e320aff9243c64ae" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:188d96cf58cbd8f9d17bb3b0ba5c2cb144001f2d151952cdc6a7a19582433d20" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is 941db1c2e6497437e2b2286c0af1655c34159d1f0dba248af6f4658c51d8342a" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:1e38087194063576675c3d4e439e55940764b941a3c489fda5e8f7f8b4270a6d" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is 5b89aacec1ad69c706c882aaafbf121dd9d94f56092a8b7041a0f2d0a887fbce" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:0004456692e77fa2bd6bb984edf719a50427fba35d60f0d5bd7ff681f819e819" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/634afd8"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is b2b85db0c7e3df0418c85bf1310585c0f1f7a808d2975244b713c3555eb815ee" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:02487cc9a9c41171029ca0397117fb4cf84aa7dd8b3a1941e32afc847d2fd400" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is aa0eb1d343e58a64cafa04b0a741a532278de6a200edd40e3029c28db2d5fa6d" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:4aee6a152d6377a9c915ebf732bc14418bb02216d2ce2f021051a81a03609607" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/80d1ac9"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/5abed12"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is 1781c3bcd9d0f56717db4abfb8e02d1fac984fa213e88cd623d4d45f03fa3ede" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:5a3c1c69ff1561e47704d848ad3476817f94eab936309b5d0044b7e20b65fccf" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is 61b35dcabeea4c066aa8b2bbc18fea06547238e984833034db9a2f2d49b29bf2" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:7f1037f7cbdbbb695f0d0500f7a7a17591f8944d7a3c8562e72ad04af81d49b2" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/ca47f2b"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is 0c92e19043dc2d86033b9002a62942ef906750854200b08b700a595e6472c57f" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:9a608b61491273e03808242de8d432d27cd0d4296a75d87e234b47fb4f18a438" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/b68a77c"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Manifest digest is acf97a56f576b1b724a90982fb1e154996f61133fdf15762c9fd6cf5d6eb22ed" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="v2 SHA digest is sha256:10d802268927b799b19f9c498241eb0d2ea36f4f05cd16db36cf82b91f3a71da" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:44Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/ea41089"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/a847504"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="Manifest digest is 80e98531d87e9a679d8880f4575ee13dfe8108db1a767ba1589292dc76418c5b" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="v2 SHA digest is sha256:e0f504843e2e9bb554d886018b5ad5263109f09b9dc6ce60b378874609c2fe62" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/d5c96d4"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="Manifest digest is 980ac70cdf70e37aea5289f084e648b8fc61fb2b9497a682bbab85a82475c50b" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="v2 SHA digest is sha256:f9e7edf44d7f3a34b1cb4f6ac1eb68d0e9e19085fb578a622ddd7bd49a88b17f" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/buildcache"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/d3668aa"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="Manifest digest is 43e32f2cfc49085447c0e4ac21f5b2551633e3d310b631156438c810d03c5ff5" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="v2 SHA digest is sha256:cf3e7d31a57d44f6c7925e95ccc4a922ecebed459952dae24d9cd4e856a956ce" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="Performing HTTP GET https://ghcr.io/v2/abatilo/blog/manifests/35ada8b"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="SHA256 of manifest parent is sha256:cefd2c27e1573dd5d84aa77023cbac22f0c41ef6cdfb0a32cd1069c5ab49098d" alias=app application=blog image_name=abatilo/blog image_tag=b5974fc registry=ghcr.io
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater time="2024-06-22T21:02:45Z" level=trace msg="released semaphore and terminated waitgroup"
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater panic: runtime error: invalid memory address or nil pointer dereference
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1f572db]
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater goroutine 552 [running]:
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater github.com/argoproj-labs/argocd-image-updater/pkg/registry.TagInfoFromReferences(0xc000776140?, 0xc000dfb380, 0x1f?, 0xc000c3e340, {0xc00044b600?, 0x1a, 0x2d89?})
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater      /src/argocd-image-updater/pkg/registry/client.go:364 +0x13b
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater github.com/argoproj-labs/argocd-image-updater/pkg/registry.(*registryClient).TagMetadata(0xc0007763c0, {0x2a905e0, 0xc00103f310?}, 0xc000dfb380)
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater      /src/argocd-image-updater/pkg/registry/client.go:283 +0x11e9
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater github.com/argoproj-labs/argocd-image-updater/pkg/registry.(*RegistryEndpoint).GetTags.func1({0xc000559e60, 0xa})
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater      /src/argocd-image-updater/pkg/registry/registry.go:154 +0x21d
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater created by github.com/argoproj-labs/argocd-image-updater/pkg/registry.(*RegistryEndpoint).GetTags
argocd-image-updater-7959c4f976-wb4hp argocd-image-updater      /src/argocd-image-updater/pkg/registry/registry.go:135 +0xa65
@abatilo abatilo added the bug Something isn't working label Jun 22, 2024
@chengfang
Copy link
Collaborator

@abatilo thanks for reporting this issue. Will take a look.

@abatilo
Copy link
Author

abatilo commented Jun 24, 2024

Thank you @chengfang. I've been trying to dig into this but I'm still not very comfortable with this code base.

I believe given that it's a nil pointer dereference, I think that it has to do with the GitHub Container Registry having unknown/unknown architecture types for attestation manifests as documented here:

https://github.com/orgs/community/discussions/45969.

You can see an example of this with the following image that reproduces the problem:
https://github.com/abatilo/blog/pkgs/container/blog/233740104?tag=cfc2661

However, I've tried disabling sbom and attestation flags on my builds which is preventing any OS/Arch information from getting published which I think causes the same panic, and I think it's similar to the unknown/unknown problem, but this time there just aren't any OS/Arch bits of information.

Here is a sample image that doesn't have the OS/Arch information:

https://github.com/abatilo/blog/pkgs/container/blog/233882546?tag=2e7b4db

All of this is still just a theory though. I haven't been able to confirm anything. I also haven't been able to pinpoint what diff in v0.12.2 and v0.13.1 would cause this change.

Thank you for your help @chengfang

@chengfang
Copy link
Collaborator

chengfang commented Jun 24, 2024

The panic occurred in

platforms = append(platforms, ref.Platform.OS+"/"+ref.Platform.Architecture)
, which was added in #618 (fix: Add support for ocischema.DeserializedImageIndex manifest type). It looks related to the missing Platform field in oci image index.

I think we should improve this function TagInfoFromReferences to safely handle missing Platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants