Repository navigation
build: unify bundle build, publish and packaging in MSBuild - #21304
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21304Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21304" |
There was a problem hiding this comment.
🟡 Changes recommended
Prepared Dashboard reuse can fail during signed macOS retries, and verifier-only changes bypass their regression tests.
2 open issues
What changed in this PR
This PR centralizes native CLI bundle publishing, signing, and packaging in eng/Bundle.proj, replacing duplicated GitHub Actions and Azure Pipelines orchestration.
Changes:
- Adds independent component-reuse controls and preserves wrapper compatibility for
SkipNativeBuild. - Restores signing tools separately and validates assembled archives and final CLI payloads.
- Updates behavioral tests, CI routing, and build documentation.
| File | Description |
|---|---|
| tools/CreateLayout/README.md | Documents explicit Dashboard selection. |
| tools/CreateLayout/Program.cs | Accepts and validates prepared Dashboard directories. |
| tests/Infrastructure.Tests/WorkflowScripts/AutoRerunTransientCiFailuresTests.cs | Tests retry rules for bundle build steps. |
| tests/Infrastructure.Tests/TestTriggerMap/TestTriggerMapTests.cs | Covers expanded bundle consumer routing. |
| tests/Infrastructure.Tests/Pipelines/TrayBundleTests.cs | Removes obsolete orchestration source assertions. |
| tests/Infrastructure.Tests/Pipelines/BundlePayloadArtifactTests.cs | Tests valid and malformed payload archives. |
| tests/Infrastructure.Tests/Pipelines/BundleBuildWrapperTests.cs | Tests wrapper argument and environment handling. |
| tests/Infrastructure.Tests/Hex1bNativePublishingTests.cs | Tests Dashboard reuse and tray path resolution. |
| tests/Infrastructure.Tests/CreateLayout/CreateLayoutTests.cs | Tests explicit Dashboard input validation and filtering. |
| src/Aspire.Tray/README.md | Updates tray publishing guidance. |
| src/Aspire.Tray/Mac/publish.sh | Uses the renamed bundle tray target. |
| src/Aspire.TerminalHost/Aspire.TerminalHost.csproj | Uses the shared TerminalHost framework property. |
| src/Aspire.Managed/Aspire.Managed.csproj | Uses the default framework property. |
| src/Aspire.Dashboard/Aspire.Dashboard.csproj | Uses the shared Dashboard framework property. |
| localhive.sh | Uses SkipCliArtifacts for payload-only builds. |
| localhive.ps1 | Uses SkipCliArtifacts for payload-only builds. |
| eng/Versions.props | Centralizes component target frameworks. |
| eng/scripts/verify-cli-tool-nupkg.ps1 | Verifies NuGet signatures cryptographically. |
| eng/scripts/verify-cli-archive.ps1 | Adds embedded bundle and executable signature checks. |
| eng/scripts/verify-bundle-payload.ps1 | Validates payload structure, architecture, permissions, and signatures. |
| eng/RestoreSigningTools.proj | Restores signing tools independently of components. |
| eng/pipelines/templates/build_sign_native.yml | Delegates native orchestration to Bundle.proj. |
| eng/pipelines/azure-pipelines.yml | Verifies assembled NuGet package signatures. |
| eng/github-ci/test-trigger-map.yml | Updates bundle input routing and verifier classification. |
| eng/dashboardpack/Common.projitems | Uses the shared Dashboard framework property. |
| eng/Bundle.proj | Centralizes publishing, signing, assembly, and packaging. |
| eng/build.sh | Translates legacy skip controls at the bundle boundary. |
| eng/build.ps1 | Translates controls and isolates legacy environment properties. |
| docs/specs/bundle.md | Documents lifecycle, controls, and validation. |
| docs/ci/ci-pipeline-optimizations.md | Describes shared per-platform bundle orchestration. |
| docs/ci/auto-rerun-transient-ci-failures.md | Documents bundle-step retry handling. |
| .github/workflows/build-cli-native-archives.yml | Uses shared orchestration and checks final self-extraction. |
| .github/workflows/auto-rerun-transient-ci-failures.js | Recognizes consolidated bundle build steps. |
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
There was a problem hiding this comment.
🔵 Needs a closer look
Release-signing changes require human review of final-revision official-build logs and signed artifacts, whose validation remains pending in the supplied evidence.
No open issues 🎉
5 resolved since last review
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
There was a problem hiding this comment.
🔵 Needs a closer look
The signing and package-provenance changes need maintainer verification because the reported manual run does not cover automatic-main PostBuildSign=true behavior, and internal evidence could not be independently inspected.
No open issues 🎉
Review effort: Balanced
Sébastien Ros (sebastienros)
left a comment
There was a problem hiding this comment.
Thanks for working through the earlier review. All 11 of my previous comments are addressed in fae4509965a and fa6d0cada24. The signing-contract item is covered by the author-reported 1602 builds 3125633 (on 09a34912153) and 3126923 (on this head). I still can't open dnceng/internal myself, so that part rests on the posted logs and artifact checks.
I'm leaving this as a comment rather than an approval for one reason: GitHub reports the branch as conflicting with main. #20764 added Linux tray support to the targets and pipeline steps this PR rewrites (see the inline comment on eng/Bundle.proj). That conflict has to be resolved before merge and can't be a follow-up. Since the resolution touches Bundle.proj and build_sign_native.yml, a fresh 1602 run on the resolved head would be worth recording. Once that's done, I don't see anything else blocking.
New since the last review: 1 minor issue in the CreateLayout target-framework lookup (suggestion included).
I reviewed the changes between 09a34912153 and 97719af0018 and the conflicting main commits, but didn't build or run anything.
Keep Linux tray publishing, prepared payload paths, and archive verification in the shared MSBuild bundle pipeline. Retain packaged-tray smoke checks in both CI callers. Preserve Windows signing and macOS whole-app signing and notarization before layout assembly and CLI embedding. Co-authored-by: Copilot App <[email protected]>
Use one TrayDirectory input for publishing, signing, prepared-payload validation, and layout assembly. Keep the macOS app producer contract and whole-app signing flow intact. Reject incompatible tray build hosts before restore or component publishing, while allowing cross-architecture lanes and prepared input reuse. Share the Windows/Linux publishing command and cover the unified --tray input and empty-directory failures. Co-authored-by: Copilot App <[email protected]>
Use --tray-dir for CreateLayout and update bundle wiring, diagnostics, tests, and documentation to match the directory-only input contract. Co-authored-by: Copilot App <[email protected]>
The stabilization smoke invokes Bundle.proj directly with SkipNativeBuild, which no longer controls CLI artifact production in the shared bundle build. It unnecessarily publishes an AOT CLI before separately publishing the non-AOT smoke driver. Pass SkipCliArtifacts instead. Exercise the complete smoke script up to the driver-publish boundary and check its bundle invocation, without rebuilding product binaries. Route future script changes to that coverage. The new caller and routing regressions failed before the fix. All 354 focused wrapper, selector, layout, tray, and native-publishing cases now pass. Full stabilized-feed consumer smoke was not run locally. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The cross-CI signing changes require maintainer review because internal signing timelines and artifacts could not be independently inspected, and automatic-main PostBuildSign=true and production release paths remain unvalidated.
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Jose Perez Rodriguez (joperezr)
left a comment
There was a problem hiding this comment.
LGTM. Let's keep this on main for now and not backport it to release/17.0. We're in the middle of getting 17.0 ready, so I'd rather avoid introducing additional build and packaging risk this late and give the shared flow some bake time on main first.
CreateLayout's standalone discovery throws a generic LINQ error when a component has no framework metadata, before its project-specific error can run. Use SingleOrDefault with a null-conditional read; preserve duplicate-key detection and add a missing-key regression. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
Security-sensitive signing orchestration across two CI systems requires maintainer verification because internal official-build evidence cannot be independently inspected and the automatic-main PostBuildSign=true path remains unvalidated.
Review effort: Balanced
CI confidence report🟡 ISSUES No blocker remains, but the limitations below still need attention. Attention🟡 Stabilization caller fixed; full feed smoke remains unrun — Source defect resolved at fabb88c; whole-script boundary is not full stabilized-feed validation
🟡 Historical CI failures and undiagnosed successful retry — Final-head CI passed attempt 2; retry success does not diagnose earlier failures
🟡 Official MDE linux-x64 scan — Canceled zero-file MDE scans; no required blocking gate established
🟡 Official MDE linux-musl-x64 scan — Canceled zero-file MDE scans; no required blocking gate established
Audited commit: 26cda5ab EDIT: ☑️ Validation finished: CI run, attempt 1 — failure; macOS ARM64 starter validation stopped on an artifact-download timeout before CLI installation completed. Verdict not yet re-evaluated. EDIT: ☑️ Validation finished: CI run, attempt 2 — success; the current-head PR check run completed successfully on This is a partial CI-confidence review, not a complete code review. Coverage catalogThe items below show the affected workflows, tests, artifacts and other validation evidence. Workflows and pipelines🟡 1. GitHub execution and coverage — A workflow or test lane still needs attention.
🟡 1a. Affected workflow final-definition execution — Attention
🟢 Pinned shared native archive production and Dashboard consumers
🟢 1b. Outerloop scenario coverage — Verified
🟢 1c. Quarantine scenario coverage — Verified
🟢 1d. Deployment E2E coverage — Verified
🟢 Deployment build-artifacts native CLI producer
🟢 2. Internal Azure pipeline/stage execution — Verified
🟢 Official native win-x64
🟢 Official native win-arm64
🟢 Official native osx-x64
🟢 Official native osx-arm64
🟢 Official native linux-x64
🟢 Official native linux-arm64
🟢 Official native linux-musl-x64
🟢 3. CI selection/result gates — Verified
🟢 Native bundle consumer routing and retry classification
Functional and platform coverage🟢 4. Ordinary functional/regression/platform coverage — Verified
🟢 Native layout and tray configuration contracts
Produced outputs and artifacts🟢 5. Artifact/release-consumer integrity — Verified
🟢 Assemble signed Dashboard/CLI release artifacts
Static checks and dependency safety🟡 6. Lint/static analysis/generated consistency — Attention
🟢 zizmor
🟢 actionlint
🟢 shellcheck
🟢 psscriptanalyzer
⚪ 7. Dependency/action/task/tool version safety — Not applicable
Security and agent behavior🟢 8. Security/trust-boundary review — Verified
🟢 Native build/signing trust review
⚪ 9. Representative agent behavior — Not applicable
|
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |



Description
GitHub Actions and Azure Pipelines carry separate publish, signing, and
packaging steps for the same native bundle. This PR consolidates that work in
eng/Bundle.proj, so both CI systems use one implementation instead of growingparallel lists of workflow and pipeline steps.
The shared MSBuild flow publishes the components, signs prepared outputs,
assembles the embedded bundle, and builds and packages the native CLI. Callers
supply their RID, version, configuration, and signing mode; component reuse and
the ordering of those operations stay in the shared build.
CreateLayout accepts explicit prepared component paths so assembly uses the
intended payload and fails on invalid explicit inputs. Components are signed
before embedding, and the CLI is signed before distribution packaging.
Official Assemble signs the three Linux Dashboard NuGet containers and stages
the four producer-signed Windows/macOS containers without modifying them.
Validation
Validation head:
97719af00186e44771ca776dd6871d621eea68f0.GitHub CI/native hosting tested merge
e6b1aae613675bb356325fc2133b08c539805c94,whose parents are this head and target
100acc9and whose source tree matchesthe head. Official and standalone builds pinned the exact head.
Upstream main subsequently advanced to
be803a1. A fresh merge-tree checkfound no conflicts with this head, without changing the branch, index, or
worktree. Integration with that newer base has not been rebuilt or retested;
the runs below cover the explicitly identified baseline.
CI, native hosting, real signing, and independent artifact checks passed.
The standalone full-solution build failed, and a broader local coordinator
test run was incomplete; validation is not all green.
11.0.100-rc.2.26504.105GitHub product version:
17.0.0-pr.21304.g97719af0.Official product version:
17.0.0-preview.1.26554.21.Detailed execution, artifact, failure, review, and limitation evidence:
validation report.
Focused infrastructure command - passed, 741/741:
Incoming IDE-capability command - passed, 3/3:
Call-outs
SkipNativeBuild=true ./build.sh --build --pack -c Releasefailed because
AddProject<TProject>is obsolete in the playground AppHost.A targeted AppHost build at merged base
87ef7dfreproduced the sameAppHost.cs(11,15): error CS0618on macOS ARM64 with the pinned SDK.Relevant source/build/SDK inputs remain identical at target
100acc9andthis head. This specific compiler failure predates the PR, but the standalone
workflow remains failed. The baseline was not a full-solution or Ubuntu
full-workflow reproduction; the fork-only harness did not validate Azure
deployment.
DotnetProjectBuildCoordinatorTestsclass run was stoppedafter repeated build-resource timeouts and is not passed. Its cause is not
established. Separate current CI Hosting.Dotnet runs passed on Linux
(477 passed, 14 skipped) and Windows (475 passed, 7 skipped).
migrated retry matchers; Max was requested, but execution effort is not
exposed. Current main's force-mode bypasses selective live retry
classification; the rules are covered by behavioral tests.
cryptographically verified. Official Dashboard/TerminalHost runtime smokes
passed for Linux x64, Windows x64, and macOS ARM64; four RID smokes were
skipped. Structural checks do not establish cross-architecture execution
or Windows ARM64 tray UI.
19-alert summaries across jobs, not distinct-alert totals, and some jobs
did not wait for queued new-component processing. Agent-image patch,
SBoM Dockerfile-recognition/Maven, and pinned ILCompiler NU1903 warnings
remain.
PostBuildSign=true, main-only SDL enforcement, sourceindexing, and production release promotion/publication are not established
by this manual personal-branch run.
Security considerations
This changes signing orchestration. NuGet-container signatures and native
executable signatures are separate contracts. Official signing and final
Dashboard-package provenance were checked, but the successful build is not
a security clearance or a completed comprehensive CI-confidence verdict.
Checklist
<remarks />and<code />elements on your triple slash comments?