Skip to content

Support manifest-only releases from retained pipeline artifacts - #38541

Closed
kubaflo wants to merge 1 commit into
mainfrom
kubaflo-pipeline-3075693-failure
Closed

kubaflo wants to merge 1 commit into
mainfrom
kubaflo-pipeline-3075693-failure

Conversation

@kubaflo

@kubaflo kubaflo commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

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!

Description of Change

Add an opt-in manifestSourceBuildId parameter to recover an interrupted MAUI workload-manifest release using artifacts retained by an earlier release-pipeline run. Its default is 0, preserving the normal release path.

Root cause: a new release run does not inherit prepared artifacts from an earlier run. Skipping preparation leaves the manifest-publishing job without its input. Gathering the whole BAR drop again can also fail after pack publishing has changed the recorded package locations.

The recovery path:

  • Requires a completed, non-PR source run from the same internal project, pipeline, and repository, with matching release commit and selection filters and successful original preparation.
  • Downloads only the original pack inventory for read-only NuGet.org availability checks. It creates no pack-publishing or workload-promotion jobs and does not gather the BAR drop again.
  • Validates retained manifest nuspec identities and records their SHA-256 hashes in a recovery audit before manual approval.
  • Uses governed 1ES downloads of the original manifest artifact, preserving provenance and SBOM validation. It executes a separately hashed helper from the current checkout, never the script bundled with the old artifact.
  • Checks the approved manifest hashes again, publishes only missing manifest NuGets, and verifies the complete expected manifest set.
  • Supports pushPackages: false to prepare the recovery audit without an approval or publishing stage. commitHash: skip remains a no-op.

The existing manifest-publishing steps are shared between normal and recovery paths. Documentation covers the required inputs and procedure. The existing PowerShell CI workflow now includes the new recovery suite and triggers for all related helper/template files.

Recovery constraints

This mode supports dotnet/maui only and requires pushWorkloadSet: false, pushNugetOrg: true, and nugetAlreadyAttemptedPackFilters: skip. Manifest packages themselves are NuGets; this prevents republishing workload/library packs, not publishing the missing manifests.

Do not skip preparation in a new normal run expecting old artifacts to be inherited, regather an already-released drop for this recovery, or repackage old manifests as newly produced artifacts.

Validation

  • All 87 targeted Pester tests pass, both locally with Pester 5.9.0 / 6.0.1 and in the actual GitHub Actions job with the CI-pinned Pester 5.9.0.
  • Actual Azure/1ES expansion passes for five modes: manifest recovery, recovery dry run, normal workload release, non-workload release, and commit-skip. Expanded recovery excludes pack/promotion jobs; the dry run excludes publishing and approval jobs; production recovery selects the original artifact explicitly.
  • A hosted pushPackages: false recovery run succeeded from exact commit 69ec1e801b on an isolated internal test branch. It verified all 57 original packs on NuGet.org and validated all four retained manifests, with successful source provenance and preparation checks.
  • The downloaded recovery audit matches the complete original pack inventory and every original manifest SHA-256. The staged helper matches its recorded hash, and the recovery output contains no .nupkg files.
  • The full GitHub PowerShell CI job reports 1,730 passed / 13 failed. All 13 failures reproduce on unmodified base commit 464d9376c2 in the CI-scan reconciler tests; downloaded CI results confirm there are no additional failed tests.
  • Documentation spellcheck passed.
  • Tests cover wrong source context, mismatched inputs, failed preparation, missing artifacts/packs, malformed or ambiguous nuspecs, duplicate inventories, altered packages/audits, dry-run gating, and existing publishing behavior.

No production approval or NuGet.org publishing was performed. The production publishing path was previewed, not executed; the successful hosted run exercised recovery preparation and audit generation only.

Issues Fixed

No linked GitHub issue. Addresses recovery of workload manifests after the corresponding packs have already been published.

Add opt-in recovery with source validation, pack availability checks, manifest identity and audit checks, and governed artifact reuse. Include the recovery suite in the PowerShell CI gate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 14, 2026 23:08
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 38541

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 38541"

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A critical pipeline-routing guard and a prerelease manifest-identity fix remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds an opt-in manifestSourceBuildId flow to recover MAUI workload-manifest releases from retained pipeline artifacts.

Changes:

  • Adds source, artifact, manifest identity, and hash validation.
  • Adds recovery pipeline stages and shared publishing logic.
  • Expands tests, documentation, and CI coverage.

Unresolved findings:

  • Critical (1 vote): Add a zero-ID guard to normal workload publishing stages in ci-official-release.yml.
  • Moderate (1 vote): Allow prerelease manifest versions in nuget_release_packages.ps1.
File summaries
File Description
eng/scripts/prepare_manifest_recovery.Tests.ps1 Tests recovery validation and failure cases.
eng/scripts/prepare_manifest_recovery.ps1 Validates source runs, artifacts, packs, and recovery audits.
eng/scripts/nuget_release_packages.Tests.ps1 Tests manifest validation and audit integrity.
eng/scripts/nuget_release_packages.ps1 Adds manifest identity and audit-hash validation.
eng/pipelines/common/workload-manifest-recovery.yml Defines recovery preparation, approval, and publishing stages.
eng/pipelines/common/publish-workload-manifests-steps.yml Shares manifest filtering, publishing, and verification steps.
eng/pipelines/ci-official-release.yml Adds recovery routing and release parameters.
eng/pipelines/ci-official-release.Tests.ps1 Verifies pipeline expansion and recovery safeguards.
docs/ReleaseProcess.md Documents recovery inputs and procedures.
.github/workflows/powershell-script-tests.yml Runs recovery tests and tracks related files.
Review details

Suppressed comments (1)

eng/scripts/nuget_release_packages.ps1:154

  • This identity pattern rejects preview/RC/alpha MAUI manifest packages. DotNetMauiManifestVersionBand is derived from DotNetVersionBand, which appends -preview.N, -rc.N, or -alpha.N for prerelease builds (eng/Versions.props:208-211), so a real package such as Microsoft.NET.Sdk.Maui.Manifest-11.0.100-preview.6 fails before the recovery audit can be produced. Allow the prerelease suffix and add a test for it.
    if ($package.id -notmatch '^Microsoft\.NET\.Sdk\.Maui\.Manifest-[0-9]+\.[0-9]+\.[0-9]+(?:\.Msi\.(?:arm64|x64|x86))?$' -or
        $package.fileName -ine "$($package.id).$($package.normalizedVersion).nupkg") {
  • Files reviewed: 10/10 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment on lines +115 to +116
- ${{ if and(ne(parameters.manifestSourceBuildId, 0), ne(parameters.commitHash, 'skip')) }}:
- template: /eng/pipelines/common/workload-manifest-recovery.yml@self

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 69ec1e80 Deployed Sep 14, 2026 by kubaflo via conclusion #1899
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants