Re-apply dry-run fix for CopyImageService publish config lookup#1972
Merged
lbussell merged 2 commits intodotnet:mainfrom Feb 19, 2026
Merged
Re-apply dry-run fix for CopyImageService publish config lookup#1972lbussell merged 2 commits intodotnet:mainfrom
lbussell merged 2 commits intodotnet:mainfrom
Conversation
Verifies that ImportImageAsync succeeds in dry-run mode when PublishConfiguration has no RegistryAuthentication entries. This scenario occurs in PR validation pipelines where appsettings.json is not generated. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>
nagilson
approved these changes
Feb 19, 2026
Member
nagilson
left a comment
There was a problem hiding this comment.
Seems good, but left a few comments worth addressing. Thanks!
joeloff
approved these changes
Feb 19, 2026
Member
joeloff
left a comment
There was a problem hiding this comment.
Not familiar with the code, just going off the description and changes you linked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #1966 fixed
CopyImageService.ImportImageAsyncto skip thePublishConfigurationlookup in dry-run mode. This fix was inadvertently reverted by the logging migration in #1968 due to a bad merge.This causes
CopyBaseImagesandCopyAcrImagesto fail in PR validation pipelines with:In PR builds,
appsettings.jsonis intentionally not generated (thegenerate-appsettings.ymlstep skips for PRs), soPublishConfiguration.RegistryAuthenticationis empty. TheGetRegistryResourcecall was happening before theisDryRuncheck, so even dry-run mode required a fully populated config.Changes
CopyImageServiceTestswith a test that exercisesImportImageAsyncin dry-run mode with an emptyPublishConfiguration, verifying it does not throw.GetRegistryResourcecalls and all Azure import logic after an early return forisDryRun, so dry-run mode only logs what would happen without requiring registry authentication details.Fixes pipeline failures in #1963.