Skip to content

Do not copy referrers in CopyBaseImages#2073

Merged
lbussell merged 2 commits intodotnet:mainfrom
lbussell:no-copy-referrers
Apr 10, 2026
Merged

Do not copy referrers in CopyBaseImages#2073
lbussell merged 2 commits intodotnet:mainfrom
lbussell:no-copy-referrers

Conversation

@lbussell
Copy link
Copy Markdown
Member

Hypothesis: CopyBaseImages is timing out due to network isolation restrictions when reaching out to DockerHub. Even though #2071 failed to provide the improved logging that I want (#2072 is follow-up for that), I still believe that network isolation is the cause, because dotnet/dotnet-docker#7141 has the same timeout symptom when reaching out to DH, in a completely different scenario (a Dockerfile build).

Even though I do not have concrete logs showing that the network isolation is the cause, I am submitting this PR now in order to unblock servicing/staging images asap.

This PR adds a required bool copyReferrers parameter to ICopyImageService.ImportImageAsync so callers must explicitly opt in or out of referrer copying. It disables the referrer lookup and copy in CopyBaseImages. At the moment we do not use referrer artifacts from base images for any reason, so there is no downside.

AI generated change summary
  • ICopyImageService / CopyImageService — Added required copyReferrers parameter. When false, skips both GetReferrersAsync and the referrer import loop.
  • CopyBaseImagesCommand — Passes copyReferrers: false.
  • CopyAcrImagesCommand / BuildCommand — Pass copyReferrers: true (preserving existing behavior).
  • Tests — Added ImportImageAsync_CopyReferrersFalse_SkipsReferrerDiscoveryAndImport; updated all existing mock verifications to pass the new parameter explicitly.

lbussell and others added 2 commits April 10, 2026 11:32
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lbussell lbussell requested a review from a team as a code owner April 10, 2026 18:45
@lbussell lbussell requested a review from mthalman April 10, 2026 18:45
@lbussell lbussell merged commit 827b54e into dotnet:main Apr 10, 2026
12 checks passed
@lbussell lbussell deleted the no-copy-referrers branch April 10, 2026 19:33
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.

2 participants