Skip to content

Remove unnecessary Docker login from CleanAcrImagesCommand#2044

Merged
lbussell merged 1 commit intodotnet:mainfrom
lbussell:fix-cleanup
Mar 24, 2026
Merged

Remove unnecessary Docker login from CleanAcrImagesCommand#2044
lbussell merged 1 commit intodotnet:mainfrom
lbussell:fix-cleanup

Conversation

@lbussell
Copy link
Member

The cleanup command wrapped operations in ExecuteWithCredentialsAsync, which tried to Docker-login using the registry's service connection from publishConfig.RegistryAuthentication. That service connection was not referenced in the pipeline stage, causing Azure DevOps to refuse OIDC token issuance.

The Docker login was unnecessary - all ACR operations authenticate directly via cleanServiceConnection through the Azure SDK. Removing the wrapper and the unused IRegistryCredentialsProvider dependency should fix the pipeline failure.

Fixes #2028

The cleanup command wrapped operations in ExecuteWithCredentialsAsync,
which tried to Docker-login using the registry's service connection from
publishConfig.RegistryAuthentication. That service connection was not
referenced in the pipeline stage, causing Azure DevOps to refuse OIDC
token issuance.

The Docker login was unnecessary - all ACR operations authenticate
directly via cleanServiceConnection through the Azure SDK. Removing the
wrapper and the unused IRegistryCredentialsProvider dependency fixes the
pipeline failure.

Fixes dotnet#2028

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lbussell lbussell requested a review from a team as a code owner March 23, 2026 22:10
@lbussell lbussell merged commit fb308a5 into dotnet:main Mar 24, 2026
12 checks passed
@lbussell lbussell deleted the fix-cleanup branch March 24, 2026 16:11
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.

cleanup-acr-images pipeline fails with missing service connection reference

2 participants