Skip to content

Conversation

@tonistiigi
Copy link
Member

Two separate fixes to avoid bombarding registry with extra requests.

Potential follow-ups for the next feature release:

  • Limit the amount of parallelization. Too many requests are sent in parallel that is not optimal.
  • The attestation manifest is still accessed twice from the original repository if the same manifest that is in the index is also returned for the referrers command.

Currently needed manifests were filtered out and then
copied in a loop, but for each copy still the full
unfiltered descriptor was copied instead of single
manifest, resulting multiple push attempts for same
descriptor.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
When creating resulting image index it is wasteful
to check for attestations for the descriptors in original
index what were already attestation for subject manifest.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi added this to the v0.31.1 milestone Jan 22, 2026
@tonistiigi tonistiigi requested a review from jsternberg January 22, 2026 23:53
If multiple tags are specified for the same repo, it is
wasteful to use them as separate targets and better to
make them share the blob upload phase of the push.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi
Copy link
Member Author

tonistiigi commented Jan 23, 2026

Added one more optimization for the case where multiple destination tags are set.

if err := eg2.Wait(); err != nil {
return err
}
ctx = withMediaTypeKeyPrefix(ctx) // because of containerd bug this needs to be called separately for each ctx/goroutine pair to avoid concurrent map write
Copy link
Member

Choose a reason for hiding this comment

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

Off-topic, but is there a ticket related to this so that we can track if it's still needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants