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

fix: remote.Referrers: Set remoteIndex.ref to resolve panics in Index manifests #2009

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bmoylan
Copy link
Contributor

@bmoylan bmoylan commented Sep 14, 2024

When remote.Referrers() returns a v1.Index, fetching derivative objects (like referenced manifests) requires keeping the Reference to the original repository.

Without setting the ref field, we get nil pointer dereference panics in (*remoteIndex).childDescriptor()

func (r *remoteIndex) childDescriptor(child v1.Descriptor, platform v1.Platform) (*Descriptor, error) {
ref := r.ref.Context().Digest(child.Digest.String())

@bmoylan
Copy link
Contributor Author

bmoylan commented Sep 24, 2024

Hi @jonjohnsonjr @imjasonh hoping you can take a look at this panic fix. I hope I'm not missing any side effects with the *remote.Index now holding a ref that doesn't actually exist in the remote's manifest store (since the referrers index is created on-the-fly)

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.

1 participant