Skip to content

Reduce PR validation time by decoupling CLI archive dependencies#15023

Merged
radical merged 11 commits intorelease/13.2from
cli-parallel
Mar 7, 2026
Merged

Reduce PR validation time by decoupling CLI archive dependencies#15023
radical merged 11 commits intorelease/13.2from
cli-parallel

Conversation

@radical
Copy link
Member

@radical radical commented Mar 6, 2026

Why

The main goal of this change is to reduce total PR validation time. Today the workflow serializes more CI work than necessary, which delays when test lanes can begin and stretches the full end-to-end validation path for a pull request.

How

  • decouple the CLI archive workflow from build_packages by letting the archive workflow build the bundle dependencies it needs itself
  • remove duplicated work from build_packages so shared package production and CLI archive production can proceed in parallel
  • move RID-specific DCP/Dashboard NuGet publication to the CLI archive lanes that actually produce those artifacts
  • split CLI archive builds by platform and split requires_nugets test lanes by OS so each lane waits only for the artifacts it consumes
  • remove stale summary scaffolding from tests.yml
  • document the dependency graph and pipeline shape in docs/ci/TestingOnCI.md and docs/ci/ci-pipeline-optimizations.md

Benefit

  • package-dependent and CLI-dependent tests can start sooner
  • the workflow does less duplicated work and spends less time blocked on unrelated lanes
  • overall PR validation wall-clock time goes down because dependencies are better aligned with the order in which artifacts are built and consumed
  • the CI topology is easier to maintain because the new dependency model is documented

Notes

This is workflow and infrastructure work only; it does not change product behavior.

Before

Screenshot 2026-03-06 at 22 37 06

After

Screenshot 2026-03-06 at 22 38 01

Must check before merging

  • Run the outerloop workflow
  • Run the quarantine workflow
  • Run the get-aspire-cli-pr scripts and confirm that they still work

Copilot AI review requested due to automatic review settings March 6, 2026 21:32
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🚀 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/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15023

Or

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

@radical radical marked this pull request as draft March 6, 2026 21:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the GitHub Actions CI pipeline to let CLI native archive builds run in parallel with package builds, with the goal of unblocking Linux-dependent test jobs earlier by splitting Linux vs Windows/macOS CLI archive builds.

Changes:

  • Adds SkipBundleDeps / BuildBundleDepsOnly build switches to decouple bundle-dependency packaging from the main build_packages job.
  • Splits CLI native archive building into separate Linux and Windows/macOS jobs via a new targets JSON input.
  • Simplifies build-packages.yml by removing RID-specific NuGet staging/upload logic and skipping bundle deps during package builds.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
eng/Build.props Adds build switches to build only bundle deps or skip them during normal packaging.
.github/workflows/tests.yml Splits CLI archive builds into Linux vs non-Linux and rewires test job dependencies.
.github/workflows/build-packages.yml Skips bundle deps and uploads the full artifacts/packages tree as built-nugets.
.github/workflows/build-cli-native-archives.yml Adds targets input and builds DCP/Dashboard packages locally (instead of downloading).

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 3d4cb7a:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ❌ Upload failed
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
TypeScriptAppHostWithProjectReferenceIntegration ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22791404611

radical and others added 9 commits March 6, 2026 22:08
Let the CLI archive workflow produce its own Dashboard and DCP bundle dependencies so it can run in parallel with build_packages without waiting on that job.

Co-authored-by: Copilot <[email protected]>
Skip redundant extension, Dashboard, DCP, and Aspire.Cli work from build_packages when the CLI archive workflow is already producing those artifacts in parallel.

Co-authored-by: Copilot <[email protected]>
Break the CLI archive build into linux and non-linux targets so linux-only consumers can start sooner, and remove the unnecessary dependency on the non-linux archive job from tests_requires_nugets.

Co-authored-by: Copilot <[email protected]>
Switch the CLI archive workflow conditionals over to runner.os so they still evaluate correctly after the matrix was reshaped around per-target objects.

Co-authored-by: Copilot <[email protected]>
Route requires-nugets tests to the platform-specific CLI archive jobs and teach the matrix splitting script about the per-OS archive keys they now depend on.

Co-authored-by: Copilot <[email protected]>
Update the infrastructure tests so they validate the new per-OS requires-nugets keys and compile cleanly against the split archive matrix.

Co-authored-by: Copilot <[email protected]>
Drop the unused infra timing and dependency map code from tests.yml now that it no longer reflects the current CI pipeline behavior.

Co-authored-by: Copilot <[email protected]>
Upload the RID-specific DCP and Dashboard packages from the CLI archive workflow itself, and remove the dead staging and fan-out logic from build_packages now that those artifacts are no longer produced there.

Co-authored-by: Copilot <[email protected]>
Explain why the CLI archive build was decoupled and split by platform, how the workflow now behaves, and what latency benefits the pipeline gets from the change.

Co-authored-by: Copilot <[email protected]>
@radical radical changed the title Parallelize CLI archive build and decouple from build_packages Shorten the CLI CI critical path by decoupling archive builds Mar 7, 2026
@radical radical changed the title Shorten the CLI CI critical path by decoupling archive builds Reduce PR validation time by decoupling CLI archive dependencies Mar 7, 2026
radical and others added 2 commits March 6, 2026 22:48
Run the CLI archive workflow alongside build_packages in the specialized test runner so requiresNugets lanes still receive the arch-specific bundle artifacts that run-tests.yml downloads.

Co-authored-by: Copilot <[email protected]>
Restrict BuildBundleDepsOnly to the DCP and Dashboard pack projects for the requested TargetRids, and update the Build.props property descriptions to match the actual build behavior.

Co-authored-by: Copilot <[email protected]>
@radical radical marked this pull request as ready for review March 7, 2026 04:24
@radical radical added the area-engineering-systems infrastructure helix infra engineering repo stuff label Mar 7, 2026
@radical radical merged commit 20426d9 into release/13.2 Mar 7, 2026
419 checks passed
@radical radical deleted the cli-parallel branch March 7, 2026 07:18
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 7, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
)

* Build CLI archive bundle dependencies independently

Let the CLI archive workflow produce its own Dashboard and DCP bundle dependencies so it can run in parallel with build_packages without waiting on that job.

Co-authored-by: Copilot <[email protected]>

* Trim build_packages work during CLI archive builds

Skip redundant extension, Dashboard, DCP, and Aspire.Cli work from build_packages when the CLI archive workflow is already producing those artifacts in parallel.

Co-authored-by: Copilot <[email protected]>

* Split CLI archive builds by platform

Break the CLI archive build into linux and non-linux targets so linux-only consumers can start sooner, and remove the unnecessary dependency on the non-linux archive job from tests_requires_nugets.

Co-authored-by: Copilot <[email protected]>

* Use runner.os for CLI archive build conditionals

Switch the CLI archive workflow conditionals over to runner.os so they still evaluate correctly after the matrix was reshaped around per-target objects.

Co-authored-by: Copilot <[email protected]>

* Split requires-nugets tests by archive platform

Route requires-nugets tests to the platform-specific CLI archive jobs and teach the matrix splitting script about the per-OS archive keys they now depend on.

Co-authored-by: Copilot <[email protected]>

* Fix infrastructure tests for per-platform archive keys

Update the infrastructure tests so they validate the new per-OS requires-nugets keys and compile cleanly against the split archive matrix.

Co-authored-by: Copilot <[email protected]>

* Remove stale test summary timing scaffolding

Drop the unused infra timing and dependency map code from tests.yml now that it no longer reflects the current CI pipeline behavior.

Co-authored-by: Copilot <[email protected]>

* Route RID-specific NuGets through CLI archive jobs

Upload the RID-specific DCP and Dashboard packages from the CLI archive workflow itself, and remove the dead staging and fan-out logic from build_packages now that those artifacts are no longer produced there.

Co-authored-by: Copilot <[email protected]>

* Document the CI pipeline optimizations

Explain why the CLI archive build was decoupled and split by platform, how the workflow now behaves, and what latency benefits the pipeline gets from the change.

Co-authored-by: Copilot <[email protected]>

* Ensure specialized tests get RID-specific NuGets

Run the CLI archive workflow alongside build_packages in the specialized test runner so requiresNugets lanes still receive the arch-specific bundle artifacts that run-tests.yml downloads.

Co-authored-by: Copilot <[email protected]>

* Scope bundle dependency builds to requested RIDs

Restrict BuildBundleDepsOnly to the DCP and Dashboard pack projects for the requested TargetRids, and update the Build.props property descriptions to match the actual build behavior.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
radical added a commit that referenced this pull request Mar 10, 2026
)

* Build CLI archive bundle dependencies independently

Let the CLI archive workflow produce its own Dashboard and DCP bundle dependencies so it can run in parallel with build_packages without waiting on that job.

Co-authored-by: Copilot <[email protected]>

* Trim build_packages work during CLI archive builds

Skip redundant extension, Dashboard, DCP, and Aspire.Cli work from build_packages when the CLI archive workflow is already producing those artifacts in parallel.

Co-authored-by: Copilot <[email protected]>

* Split CLI archive builds by platform

Break the CLI archive build into linux and non-linux targets so linux-only consumers can start sooner, and remove the unnecessary dependency on the non-linux archive job from tests_requires_nugets.

Co-authored-by: Copilot <[email protected]>

* Use runner.os for CLI archive build conditionals

Switch the CLI archive workflow conditionals over to runner.os so they still evaluate correctly after the matrix was reshaped around per-target objects.

Co-authored-by: Copilot <[email protected]>

* Split requires-nugets tests by archive platform

Route requires-nugets tests to the platform-specific CLI archive jobs and teach the matrix splitting script about the per-OS archive keys they now depend on.

Co-authored-by: Copilot <[email protected]>

* Fix infrastructure tests for per-platform archive keys

Update the infrastructure tests so they validate the new per-OS requires-nugets keys and compile cleanly against the split archive matrix.

Co-authored-by: Copilot <[email protected]>

* Remove stale test summary timing scaffolding

Drop the unused infra timing and dependency map code from tests.yml now that it no longer reflects the current CI pipeline behavior.

Co-authored-by: Copilot <[email protected]>

* Route RID-specific NuGets through CLI archive jobs

Upload the RID-specific DCP and Dashboard packages from the CLI archive workflow itself, and remove the dead staging and fan-out logic from build_packages now that those artifacts are no longer produced there.

Co-authored-by: Copilot <[email protected]>

* Document the CI pipeline optimizations

Explain why the CLI archive build was decoupled and split by platform, how the workflow now behaves, and what latency benefits the pipeline gets from the change.

Co-authored-by: Copilot <[email protected]>

* Ensure specialized tests get RID-specific NuGets

Run the CLI archive workflow alongside build_packages in the specialized test runner so requiresNugets lanes still receive the arch-specific bundle artifacts that run-tests.yml downloads.

Co-authored-by: Copilot <[email protected]>

* Scope bundle dependency builds to requested RIDs

Restrict BuildBundleDepsOnly to the DCP and Dashboard pack projects for the requested TargetRids, and update the Build.props property descriptions to match the actual build behavior.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-engineering-systems infrastructure helix infra engineering repo stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants