Unify quarantine and outerloop CI with the main test pipeline#16448
Unify quarantine and outerloop CI with the main test pipeline#16448radical wants to merge 4 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16448Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16448" |
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
There was a problem hiding this comment.
Pull request overview
This PR migrates the quarantine/outerloop “specialized test runner” off the legacy MSBuild runsheet generation and onto the same metadata-driven test matrix pipeline used by the main CI, while extracting a shared reusable workflow to eliminate duplicated test-bucket job definitions.
Changes:
- Added a new reusable workflow (
run-tests-core.yml) that executes the 6 dependency-based test buckets plus a results gate. - Refactored
specialized-test-runner.ymlto generate/split matrices via the canonical pipeline and then callrun-tests-core.yml(including a new positive trait discovery mode for class splitting). - Simplified
tests.ymlto callrun-tests-core.yml, and removed legacy MSBuild runsheet targets/logic.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Infrastructure.Tests/PowerShellScripts/SplitTestProjectsTests.cs | Adds tests for new IncludeTraitFilter “graceful skip” behavior. |
| tests/Directory.Build.targets | Plumbs DiscoveryTraitFilter through to the split script as -IncludeTraitFilter. |
| eng/scripts/split-test-projects-for-ci.ps1 | Adds IncludeTraitFilter support and “skip instead of fail” behavior when no matching classes are found. |
| eng/SpecializedTestRunsheetBuilderBase.targets | Deletes legacy specialized runsheet generator base targets. |
| eng/QuarantinedTestRunsheetBuilder/QuarantinedTestRunsheetBuilder.targets | Deletes quarantined runsheet builder targets. |
| eng/OuterloopTestRunsheetBuilder/OuterloopTestRunsheetBuilder.targets | Deletes outerloop runsheet builder targets. |
| eng/AfterSolutionBuild.targets | Removes legacy combined runsheet generation target (keeps canonical matrix generation). |
| .github/workflows/tests.yml | Replaces 6 inline bucket jobs with a single call to run-tests-core.yml. |
| .github/workflows/tests-quarantine.yml | Updates paths: triggers and switches to new specialized runner inputs. |
| .github/workflows/tests-outerloop.yml | Updates paths: triggers and switches to new specialized runner inputs. |
| .github/workflows/specialized-test-runner.yml | Rebuilds specialized test execution around canonical matrices + run-tests-core.yml. |
| .github/workflows/run-tests.yml | Ensures ignoreTestFailures exits 0 reliably and always verifies TRX presence when enabled. |
| .github/workflows/run-tests-core.yml | New shared workflow implementing the 6 bucket jobs + results gate. |
Comments suppressed due to low confidence (1)
eng/scripts/split-test-projects-for-ci.ps1:50
- The script header still states it "Fails fast if zero test classes discovered when in class mode", but with IncludeTraitFilter set the script now intentionally succeeds and writes an empty partitions file. Update the .NOTES (and/or description) to reflect the conditional behavior so callers understand when zero classes is an error vs a skip.
.NOTES
PowerShell 7+
Fails fast if ExtractTestPartitions cannot be built or run.
Fails fast if zero test classes discovered when in class mode.
Only runs --list-tests when no partitions are found in the assembly.
JamesNK
left a comment
There was a problem hiding this comment.
Review: 2 issues flagged (1 correctness, 1 CI infrastructure). Both relate to the unification trade-offs — one about cross-OS build failure isolation regression, one about the auto-rerun script not accounting for the new results-gate job name.
|
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. |
|
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. |
Move the repeated six-bucket test job layout into a reusable run-tests-core workflow so the regular and specialized test pipelines can share the same execution shape. Keep the lower-level run-tests workflow responsible for per-project test execution details, including preserving ignore-test-failure result verification and avoiding cmd.exe parsing for MTP filter arguments on Windows. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b15291c7-3448-460b-b9c5-33d6c5d3f668
Replace the quarantined and outerloop bespoke runsheet builders with the same metadata-driven test matrix pipeline used by the main test workflow. The specialized runner now scopes restore/build to projects containing the requested attribute, generates the canonical matrix, splits it into dependency buckets, and delegates execution to the shared run-tests-core workflow. Carry the specialized trait into matrix entries so downstream class and partition shards keep running only the requested quarantined or outerloop tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b15291c7-3448-460b-b9c5-33d6c5d3f668
Add and update infrastructure tests for the shared workflow wiring, specialized project discovery, trigger mapping, and matrix splitting. These tests assert that quarantined and outerloop runs keep the positive specialized trait filters when class or partition shards are generated. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b15291c7-3448-460b-b9c5-33d6c5d3f668
Update the CI docs and PR testing guidance to describe the shared test workflow, the specialized quarantined/outerloop matrix path, and the MTP argument handling that workflow changes must preserve. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b15291c7-3448-460b-b9c5-33d6c5d3f668
f2184cb to
2cc0cf4
Compare
| extraTestArgs: "${{ inputs.extraTestArgs }}" | ||
| ignoreTestFailures: ${{ inputs.ignoreTestFailures }} |
Description
Migrates the specialized test runner (quarantine/outerloop) from the old MSBuild-based runsheet generation to the new metadata-driven pipeline, and extracts a shared
run-tests-core.ymlworkflow to eliminate duplicated test job definitions.Key changes
New
run-tests-core.yml— reusable workflow containing the 6 dependency-based test bucket jobs + results gate. Shared by bothtests.ymlandspecialized-test-runner.ymlto avoid duplicating job definitions.Refactored
specialized-test-runner.yml— now uses the same pipeline astests.yml:TestEnumerationRunsheetBuilder→build-test-matrix→expand-test-matrix-github→split-test-matrix-by-deps→run-tests-core. Added grep-based project scoping and positive trait filtering (DiscoveryTraitFilter) to build a lean matrix of only relevant test classes.Simplified
tests.yml— replaced 6 inline test job definitions with a single call torun-tests-core.yml.Updated
tests-outerloop.yml/tests-quarantine.yml— addedrun-tests-core.ymltopaths:triggers so workflow changes are validated on PRs.Deleted old MSBuild targets — removed
SpecializedTestRunsheetBuilderBase.targets,OuterloopTestRunsheetBuilder.targets,QuarantinedTestRunsheetBuilder.targets, and cleared the old runsheet generation fromAfterSolutionBuild.targets.split-test-projects-for-ci.ps1— addedIncludeTraitFilterparameter for positive trait filtering in class discovery mode. When set and zero classes are found, the script gracefully skips instead of erroring.tests/Directory.Build.targets— passesDiscoveryTraitFilterthrough to the split script as-IncludeTraitFilter.Tests added
IncludeTraitFilterGracefullySkipsWhenNoClassesFound— verifies graceful skip with empty output JSONWithoutIncludeTraitFilterFailsWhenNoClassesFound— verifies error behavior is preserved without the filterChecklist