Repository navigation
Migrate DevDiv insertion token from PAT to WIF on main - #13201
Merged
davidwengier merged 1 commit intoJul 16, 2026
Merged
Conversation
Ports the WIF pattern already merged to the release/* branches to main: - insert.yml: make devDivAzdoToken optional (default '') and fall back to the WIF-acquired dnceng token for --devdiv-azdo-token. The insertion SP (Roslyn-Razor-Insertion-DncEng) is enrolled in both dnceng and devdiv, so a single WIF token authenticates to both orgs. - azure-pipelines-official.yml: remove the DotNet-Roslyn-Insertion-Variables variable group and the devDivAzdoToken argument, both of which only supplied the expired PAT dn-bot-devdiv-build-e-code-full-release-e-packaging-r (expired 2026-05-18, KV secret deleted 2026-07-11). This unblocks deletion of variable group 154 (its only remaining consumer).
Member
Author
Member
Author
|
@davidwengier can I get your blessing on this PR and merge it, when possible? Thanks! |
davidwengier
approved these changes
Jul 16, 2026
davidwengier
left a comment
Member
There was a problem hiding this comment.
There should be no builds of main, and certainly no insertions from main, but I guess there is no harm in taking this, if it gets something off your TODO list. Talking with the rest of the team, there was a suggestion to delete the main branch anyway, so it really won't matter then :)
Member
Author
|
@davidwengier totally fair! I don't want to blow up your pipelines when we clean up the dead PATs :) |
JoeRobich
added a commit
that referenced
this pull request
Aug 18, 2026
Backports the VS insertion authentication changes from #13010 and #13201. Build [3031662](https://dev.azure.com/dnceng/internal/_build/results?buildId=3031662&view=results) failed during YAML validation because `DotNet-Roslyn-Insertion-Variables` no longer exists. That group supplied expired PAT credentials. This change: - migrates VS insertion from RIT/PAT authentication to `roslyn-tools` with the `DncEng Insertion: Roslyn and Razor` WIF service connection - explicitly acquires the Azure DevOps token from the WIF-authenticated Azure CLI context - reuses that token for both dnceng and devdiv - removes only the obsolete `DotNet-Roslyn-Insertion-Variables` dependency - preserves the monthly scheduled build - preserves the manually triggered VS insertion stage Validation: YAML syntax parsed successfully, `git diff --check` passed, and the release-only schedule and `trigger: manual` insertion configuration remain present. [Test Run](https://dev.azure.com/dnceng/internal/_build/results?buildId=3049433&view=results)
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.
Ports the WIF insertion pattern (already merged to the
release/*branches) tomain, so the last remaining consumer of the expired DevDiv insertion PAT is removed.Background
main's official pipeline still authenticated the DevDiv side of the VS insertion with the PATdn-bot-devdiv-build-e-code-full-release-e-packaging-r:release/dev17.14,release/dev17.12,release/stable,release/insiders) were already migrated to WIF and no longer reference it.mainwas only partially migrated: the dnceng token uses WIF viaAzureCLI@2, but--devdiv-azdo-tokenwas still fed the PAT via variable groupDotNet-Roslyn-Insertion-Variables(VG 154), whose only variable is that expired PAT.mainrarely runs the insertion stage (last official insert was 2026-05-11), so this has been latent rather than an active outage — but it blocks deletion of VG 154.Changes
eng/pipelines/insert.ymldevDivAzdoTokenoptional (default: '').--devdiv-azdo-tokenwhen no PAT is supplied. The insertion service principal (Roslyn-Razor-Insertion-DncEng) is enrolled in bothdncenganddevdiv, so a single WIF token authenticates to both orgs. This matches the roslyn-tools referenceinsert.yml.azure-pipelines-official.ymlDotNet-Roslyn-Insertion-Variablesvariable group reference (only supplied the expired PAT).devDivAzdoToken: $(dn-bot-devdiv-build-e-code-full-release-e-packaging-r)template argument.The
Razor.*insertion variables were already defined inline and are unaffected (confirmed against the release branches, which build and insert without this variable group).Follow-up
After this merges and a green
mainofficial build confirms the "Insert to VS" stage authenticates to DevDiv via WIF, variable group 154 (DotNet-Roslyn-Insertion-Variables) can be deleted.Tracked by AB#11018 (cleanup of migration AB#10089).