Skip to content

fix(registry): skip index manifest entries with nil platform#68

Merged
gavinelder merged 1 commit into
masterfrom
fix/nil-platform-panic
Jun 10, 2026
Merged

fix(registry): skip index manifest entries with nil platform#68
gavinelder merged 1 commit into
masterfrom
fix/nil-platform-panic

Conversation

@gavinelder

Copy link
Copy Markdown
Collaborator

Problem

Pods crash-loop on startup with:

panic: recovered from errgroup.Group: recovered from errgroup.Group: runtime error: invalid memory address or nil pointer dereference

Root cause

Registry.ImageInfo iterates over OCI index manifest descriptors and dereferences manifest.Platform unconditionally. In go-containerregistry, Descriptor.Platform is a *v1.Platform and is nil whenever an index entry doesn't declare a platform (common for attestation/SBOM manifests). An image with such an index entry in public.cr.seqera.io causes 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-image ConfigFile() fallback. Also drops the redundant manifests != nil check (ranging over a nil slice is a no-op).

🤖 Generated with Claude Code

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>

@ShahzebMahmood ShahzebMahmood left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gavinelder gavinelder merged commit 0d3e14d into master Jun 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants