Skip to content

Foundation-PR: pick the nightly by artifact presence, not build result - #6712

Open
romsi1983 wants to merge 2 commits into
release/dev/monobuild-2.0-stablefrom
user/romansivak/foundation-nightly-artifact-resolver-2.0-stable
Open

Foundation-PR: pick the nightly by artifact presence, not build result#6712
romsi1983 wants to merge 2 commits into
release/dev/monobuild-2.0-stablefrom
user/romansivak/foundation-nightly-artifact-resolver-2.0-stable

Conversation

@romsi1983

Copy link
Copy Markdown
Collaborator

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.

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.

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

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Comment thread build/AzurePipelinesTemplates/WindowsAppSDK-BuildInstaller-Steps.yml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants