Skip to content

Comments

Resolve image authentication after dry run check in CopyImageService#1966

Merged
lbussell merged 1 commit intodotnet:mainfrom
lbussell:fix/copy-image-dry-run
Feb 13, 2026
Merged

Resolve image authentication after dry run check in CopyImageService#1966
lbussell merged 1 commit intodotnet:mainfrom
lbussell:fix/copy-image-dry-run

Conversation

@lbussell
Copy link
Member

Fixes PR failures in #1963

@lbussell lbussell requested a review from a team as a code owner February 13, 2026 17:34
@lbussell lbussell enabled auto-merge (squash) February 13, 2026 17:34
@lbussell lbussell requested a review from mthalman February 13, 2026 17:34
@lbussell lbussell merged commit ac2bd0e into dotnet:main Feb 13, 2026
12 checks passed
@lbussell lbussell deleted the fix/copy-image-dry-run branch February 13, 2026 18:34
lbussell added a commit to lbussell/docker-tools that referenced this pull request Feb 18, 2026
Move GetRegistryResource calls after the dry-run early return so that
dry-run mode does not require a populated PublishConfiguration. This
fixes CopyBaseImages and CopyAcrImages failures in PR validation
pipelines where appsettings.json is not generated.

This fix was originally applied in dotnet#1966 but was inadvertently reverted
by the logging migration in dotnet#1968.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
lbussell added a commit that referenced this pull request Feb 19, 2026
PR #1966 fixed `CopyImageService.ImportImageAsync` to skip the
`PublishConfiguration` lookup in dry-run mode. This fix was
inadvertently reverted by the logging migration in #1968 due to a bad
merge.

1. **Test** — Added `CopyImageServiceTests` with a test that exercises
`ImportImageAsync` in dry-run mode with an empty `PublishConfiguration`,
verifying it does not throw.
2. **Fix** — Moved `GetRegistryResource` calls and all Azure import
logic after an early return for `isDryRun`, so dry-run mode only logs
what would happen without requiring registry authentication details.

Fixes pipeline failures in #1963.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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