Document gh-aw-agents federated credential for AzDO /review trigger - #36000
Closed
kubaflo wants to merge 1 commit into
Closed
Document gh-aw-agents federated credential for AzDO /review trigger#36000kubaflo wants to merge 1 commit into
kubaflo wants to merge 1 commit into
Conversation
The `trigger-review` job in `review-trigger.yml` is gated behind `environment: gh-aw-agents` (#35974), which changes its OIDC `sub` claim to `repo:dotnet/maui:environment:gh-aw-agents`. The AzDO managed identity had no federated credential for that subject, so the token exchange failed with `AADSTS700213` and every `/review` added then immediately removed the `s/agent-review-in-progress` label (the trigger was rolled back). Update `.github/docs/trigger-azdo-pipeline-setup.md` to: - document the required `gh-aw-agents` environment federated credential (replacing the stale `azdo-trigger` example) - explain that environment gating overrides the branch/PR OIDC subject, and that the `AZDO_TRIGGER_*` secrets are environment-scoped (so the gating can't simply be removed) - add an `AADSTS700213` troubleshooting row and a lessons-learned item Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36000Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36000" |
20 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Summary
Docs-only. Documents the federated credential the AzDO
/reviewtrigger actually needs after #35951 / #35974 moved theAZDO_TRIGGER_*secrets to thegh-aw-agentsGitHub environment.Why
After #35974 added
environment: gh-aw-agentsto thetrigger-reviewjob inreview-trigger.yml, the job's GitHub OIDCsubclaim changed fromrepo:dotnet/maui:ref:refs/heads/maintorepo:dotnet/maui:environment:gh-aw-agents. The AzDO managed identity has no federated credential for that subject, so the "Exchange for AzDO Token" step fails with:The token exchange fails before the pipeline is queued, so every
/reviewadds thes/agent-review-in-progresslabel and thealways()cleanup step immediately removes it (the review never starts). Example: run27772519590on #21169..github/docs/trigger-azdo-pipeline-setup.mdwas stale — it documented an example environment namedazdo-trigger, not the realgh-aw-agents.Changes (
.github/docs/trigger-azdo-pipeline-setup.md)azdo-triggerenvironment example with the requiredgh-aw-agentsfederated credential, noting it is mandatory because theAZDO_TRIGGER_*secrets are environment-scoped.environment:claim overrides the branch/PR claim, so this is the subjecttrigger-reviewpresents today.AADSTS700213troubleshooting row and a lessons-learned item.The actual fix (out of scope for this PR — infra)
This PR only documents the credential; an operator with Azure access still needs to create it:
Note
🤖 This PR (description and doc changes) was generated by GitHub Copilot CLI on behalf of @kubaflo.