fix(registry): skip index manifest entries with nil platform#68
Merged
Conversation
OCI image indexes may contain manifest descriptors without a platform field (e.g. attestation/SBOM manifests). ImageInfo dereferenced manifest.Platform unconditionally, so syncing any such image panicked with a nil pointer dereference that propagated through the nested errgroups and crash-looped the server on startup. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cristianrcv
approved these changes
Jun 10, 2026
stefanoboriero
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Pods crash-loop on startup with:
Root cause
Registry.ImageInfoiterates over OCI index manifest descriptors and dereferencesmanifest.Platformunconditionally. In go-containerregistry,Descriptor.Platformis a*v1.Platformand is nil whenever an index entry doesn't declare a platform (common for attestation/SBOM manifests). An image with such an index entry inpublic.cr.seqera.iocauses the repository sync loop to panic, which propagates through the nested errgroups (hence the doubled "recovered from errgroup.Group") and kills the process.Fix
Skip descriptors with a nil platform before reading
Architecture. Tags whose index entries all lack platforms fall through to the existing single-imageConfigFile()fallback. Also drops the redundantmanifests != nilcheck (ranging over a nil slice is a no-op).🤖 Generated with Claude Code