Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

imagetools: avoid excessive HTTP requests on create #3623

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

Open
tonistiigi wants to merge 3 commits into docker:master
base: master
Choose a base branch
Loading
from tonistiigi:imagetools-request-fixes

Conversation

@tonistiigi
Copy link
Member

@tonistiigi tonistiigi commented Jan 22, 2026

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>
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>
Copy link
Member Author

tonistiigi commented Jan 23, 2026
edited
Loading

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

@thaJeztah thaJeztah Jan 23, 2026

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

Reviewers

@thaJeztah thaJeztah thaJeztah left review comments

@jsternberg jsternberg Awaiting requested review from jsternberg

At least 1 approving review is required to merge this pull request.

Labels

Projects

None yet

Milestone

v0.31.1

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /