Foundation-PR: pick the nightly by artifact presence, not build result - #6712
Open
romsi1983 wants to merge 2 commits into
Open
Conversation
Port of the release/dev/monobuild fix. The two channels fail in opposite
directions but for the same reason: `runVersion: 'latestFromBranch'` selects the
nightly by WHOLE-BUILD result, which is not the property the download depends
on. The monobuild nightly is routinely `failed` purely because of its Test Gate
stage while its Aggregate stage still publishes a correctly named artifact.
* release/dev/monobuild has allowFailedBuilds: false, so it rejects every
Test-Gate-red nightly and falls back to a run old enough that retention has
purged its artifacts. That is the reported break:
"Artifact WindowsAppSDK-NuGet-And-MSIX was not found for build 150121328."
* this branch has allowFailedBuilds: true, so it takes the newest run
unconditionally - including runs whose Aggregate stage never produced the
artifact. 7 of the 15 most recent nightlies on this branch publish no
WindowsAppSDK-NuGet-And-MSIX at all, so the download is a coin flip today and
fails with the same 404 whenever it lands on one of them.
Fix: resolve the build id from artifact presence instead. A new shared steps
template probes the Build REST API for the newest completed run on the branch
that publishes the exact artifact name, then downloads with
`runVersion: 'specific'` / `runId`. It carries a recency guard
(maxNightlyAgeInDays, default 7) that fails with "No run of pipeline ... in the
last N days publishes an artifact named ..." rather than a confusing 404, and a
NightlyBuildIdOverride queue-time variable to pin a known-good nightly.
The added lines are byte-identical to the release/dev/monobuild change and the
new template file is the same blob; the only difference between the two commits
is which allowFailedBuilds value and comment block was removed.
Note for reviewers, deliberately NOT changed here: NightlyBranchName still
defaults to 'refs/heads/release/dev/monobuild', i.e. this branch's Foundation
builds consume the MAIN monobuild channel's package even though the nightly does
run on release/dev/monobuild-2.0-stable and does publish the artifact there.
That looks wrong but it is a separate behavioural decision for the 2.0-stable
owners, not part of this fix.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Kyaw Thant (kythant)
approved these changes
Aug 26, 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.
Port of the release/dev/monobuild fix. The two channels fail in opposite directions but for the same reason:
runVersion: 'latestFromBranch'selects the nightly by WHOLE-BUILD result, which is not the property the download depends on. The monobuild nightly is routinelyfailedpurely because of its Test Gate stage while its Aggregate stage still publishes a correctly named artifact.Fix: resolve the build id from artifact presence instead. A new shared steps template probes the Build REST API for the newest completed run on the branch that publishes the exact artifact name, then downloads with
runVersion: 'specific'/runId. It carries a recency guard (maxNightlyAgeInDays, default 7) that fails with "No run of pipeline ... in the last N days publishes an artifact named ..." rather than a confusing 404, and a NightlyBuildIdOverride queue-time variable to pin a known-good nightly.The added lines are byte-identical to the release/dev/monobuild change and the new template file is the same blob; the only difference between the two commits is which allowFailedBuilds value and comment block was removed.
Note for reviewers, deliberately NOT changed here: NightlyBranchName still defaults to 'refs/heads/release/dev/monobuild', i.e. this branch's Foundation builds consume the MAIN monobuild channel's package even though the nightly does run on release/dev/monobuild-2.0-stable and does publish the artifact there. That looks wrong but it is a separate behavioural decision for the 2.0-stable owners, not part of this fix.
A microsoft employee must use /azp run to validate using the pipelines below.
WARNING:
Comments made by azure-pipelines bot maybe inaccurate.
Please see pipeline link to verify that the build is being ran.
For status checks on the main branch, please use TransportPackage-Foundation-PR
(https://microsoft.visualstudio.com/ProjectReunion/_build?definitionId=81063&_a=summary)
and run the build against your PR branch with the default parameters.