Skip to content

Revert "Remove unnecessary Docker login from CleanAcrImagesCommand"#2052

Merged
lbussell merged 1 commit intomainfrom
revert-2044-fix-cleanup
Mar 30, 2026
Merged

Revert "Remove unnecessary Docker login from CleanAcrImagesCommand"#2052
lbussell merged 1 commit intomainfrom
revert-2044-fix-cleanup

Conversation

@lbussell
Copy link
Copy Markdown
Member

@lbussell lbussell commented Mar 30, 2026

Reverts #2044. The login was necessary for the ORAS CLI to function. Part of #2051.

@lbussell lbussell requested a review from a team as a code owner March 30, 2026 17:23
@lbussell lbussell enabled auto-merge (squash) March 30, 2026 17:25
@lbussell lbussell disabled auto-merge March 30, 2026 19:01
@lbussell lbussell merged commit 5953f97 into main Mar 30, 2026
12 of 14 checks passed
lbussell added a commit that referenced this pull request Mar 31, 2026
The Clean job runs `cleanAcrImages` against both `BuildRegistry` and
`PublishRegistry`, but only referenced the `cleanServiceConnection` in
its `reference-service-connections` call. Without `usesRegistries`, the
registry-specific service connections from `RegistryAuthentication` were
never referenced in the stage, causing `AzurePipelinesCredential` OIDC
token exchange to fail with:

> There is no explicit reference to service connection ... from current
stage Execute.Clean.__default.

Failing pipeline run: build#2939996

This PR adds `usesRegistries` for both `BuildRegistry` and
`PublishRegistry` so their service connections are referenced for OIDC.

#2044 was an attempted fix,
but it was incorrect and later reverted in
#2052. That change broke
cleanup since the cleanup pipeline uses the ORAS CLI internally to check
image lifecycle annotations. The ORAS CLI uses Docker login instead of
Azure SDK for authentication. This will not be necessary once
#2050 is merged.

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.

3 participants