Keyless Build Promotion publishing + null-guard in SetupTargetFeedConfigV3 (durable fix for #17185 regression)#17187
Closed
missymessa wants to merge 3 commits into
Closed
Conversation
…keyless Entra publishing) (dotnet#17185)" This reverts commit b7d4e15.
…(keyless Entra publishing) (dotnet#17185)" This reverts commit 18d7b7b.
…RE on keyless Entra publish)
Contributor
There was a problem hiding this comment.
Pull request overview
Re-enables keyless (Entra/WIF) Build Promotion publishing while hardening the Arcade publishing task to handle null FeedKeys/FeedOverrides, preventing the regression where keyless publishing crashed before authentication.
Changes:
- Add a null-guard in
SetupTargetFeedConfigV3so missing MSBuildFeedKey/override items don’t causeArgumentNullExceptionduring dictionary materialization. - Re-apply keyless Build Promotion publishing in
eng/publishing/v3/publish.ymlby running publishing under themaestro-build-promotionfederated identity (no PAT-based feeds key step).
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Microsoft.DotNet.Build.Tasks.Feed/src/model/SetupTargetFeedConfigV3.cs | Null-guards feedKeys/feedOverrides when ItemGroups are empty (keyless publishing scenario). |
| eng/publishing/v3/publish.yml | Keyless Build Promotion publishing configuration (auth via maestro-build-promotion, PAT-based feeds key not present). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
This was referenced Jul 25, 2026
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.
Durable fix — re-apply keyless Entra publishing, with task null-guard
This is the follow-up to #17186 (which reverted #17185 to stop production Build Promotion failures). It re-applies the keyless
publish.ymlchange and fixes the root-cause null-reference in the publishing task so keyless is actually safe.Two changes
SetupTargetFeedConfigV3.cs— null-guardfeedKeys/feedOverrides(matches the guard already present inSetupTargetFeedConfigV4). When publishing keyless (Entra/WIF), theFeedKeyMSBuild item is empty, so the task'sFeedKeysparameter arrivesnull. Previously.ToImmutableDictionary()threwArgumentNullExceptionbefore auth ran:feedKeysyields an empty dictionary and the publisher falls back to Entra auth as intended.eng/publishing/v3/publish.yml— keyless (re-applies Remove AzureDevOpsFeedsKey from Build Promotion publish.yml (keyless Entra publishing) #17185): removesAzureDevOpsFeedsKeyand theenable-cross-org-publishing.ps1 -tokenstep; publishing runs under themaestro-build-promotionfederated identity.The publishing task ships in the arcade SDK pinned by
global.json. The keylesspublish.ymlchange is only safe once the fixed task (with the null-guard from change #1) is the version actually used by Build Promotion. Required order:global.json(dependency flow) so Build Promotion consumes the fixed task.publish.ymlchange (change Create Microsoft.DotNet.Build.Tasks.IO #2).Merging the keyless change before the fixed task is live will reproduce the #17185 regression. Kept as draft until the gate above is satisfied.
Context / prior regression