Repository navigation
fix(ci): renew Azure login for delayed probe cleanup - #968
Merged
Merged
Conversation
A 55-minute Azure Pipelines run can outlive the GitHub OIDC assertion used by azure/login. Token refresh then fails during cleanup, leaving the unfinished run and probe behind. Request a fresh assertion with the job existing id-token permission and audience, and log in again as the same service principal. Use it only after a failed token or blob delete, and retry that operation once. The queue POST, run ownership, polling timeout, and original exit status remain unchanged. Cover normal cleanup, expired assertion cleanup for both the pipeline run and blob-only path, and reauthentication failure.
PsiACE
approved these changes
Nov 19, 2026
The login helper ::add-mask:: command was captured by command substitution together with the refreshed DevOps token. In Actions mode the Authorization header then contained the mask command and a newline, so cleanup status reads failed and the run was not cancelled. Set the global access_token directly and call the helper outside command substitution so the workflow command reaches the runner on stdout. Add Actions-mode expiry coverage with exact DevOps bearer checks, and restore the #959 cleanup probe-deletion assertion.
…eanup-reauth # Conflicts: # .github/azure-live-tests/test_scripts.py
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.
A long-running Azure Pipelines live test can outlive the GitHub OIDC assertion used by
azure/login. When cleanup runs after that assertion expires, refreshing the DevOps token or deleting the probe fails even though the federated credential is still valid.Renew the Azure CLI login only after a token or blob-delete failure, using the job's existing
id-token: writepermission, the same client and tenant, and the existingapi://AzureADTokenExchangeaudience. Keep the login helper's::add-mask::command on the runner's stdout while capturing only the returned token. Retry the failed operation once. The queue POST, run ID ownership, 3,300-second poll budget, #959/#969 curl 35 and HTTP 503 status retries, and original exit status remain unchanged; a failed cancel still does not prevent probe deletion.Validation on the merged branch:
python3 .github/azure-live-tests/test_scripts.py(21 tests)cargo fmt --all -- --check, andhawkeye checkNo new secrets, permissions, or long-lived state; no live Azure credentials were used.