[ci] Fix Deployment E2E tests - #20308
Ankit Jain (radical) with Copilot wants to merge 5 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 -- 20308Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20308" |
This comment has been minimized.
This comment has been minimized.
f36292a to
99c415e
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The workflow logic is correct, focused regression coverage is included, and the documentation matches MTP behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Updates the Deployment E2E workflow so MTP exit code 8 (“zero tests ran”) does not fail intentionally skipped scenarios.
Changes:
- Explicitly classifies deployment-test exit codes.
- Adds regression coverage for success, skip, failure, and crash codes.
- Documents
dotnet testaggregation behavior.
| File | Description |
|---|---|
.github/workflows/deployment-tests.yml |
Treats exit codes 0 and 8 as successful. |
tests/Infrastructure.Tests/WorkflowScripts/DeploymentTestsWorkflowTests.cs |
Tests the workflow’s exit-code classification. |
docs/ci/mtp-args-pipeline.md |
Documents the --ignore-exit-code limitation. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
This comment has been minimized.
This comment has been minimized.
|
[automated] Extended CI confidence is partially established — final-head PR CI and the affected shared-runner smoke are green, but the Deployment E2E workflow’s final exit-code path has not run from head Reviewer actions
Ready-to-use pr-testing prompt
Change classification
Confidence at a glance🟡 Deployment E2E workflow — Final-head runtime path is not yet exercised
🟢 Shared runner and specialized workflows — The original cross-platform failure is fixed at final head
🟢 Final-head PR checks and contract tests — All current checks are accounted for
🟢 Historical deployment failures — Target failure is isolated from unrelated nightly failures
⚪ Internal Azure DevOps definition 1602 — Not applicable
|
This comment has been minimized.
This comment has been minimized.
…kflow Co-authored-by: radical <1472+radical@users.noreply.github.com>
The Acquisition outerloop jobs fail on every platform when all selected tests are skipped. Microsoft Testing Platform returns exit code 8 for the test module, but dotnet test recomputes the aggregate result and still exits 8 despite --ignore-exit-code 8. Map only the aggregated zero-tests code to success in the shared Bash and PowerShell dotnet test paths. Preserve every other nonzero exit code and leave direct assembly execution unchanged, where the MTP option already works. Add focused tests that execute the classification logic extracted from the real workflow for success, zero tests, test failure, and host crash exit codes on both shell variants. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| Starting with the .NET 11 SDK, `dotnet test` decides the zero-tests result for | ||
| the whole run from its | ||
| [aggregated results](https://learn.microsoft.com/dotnet/core/tools/dotnet-test-mtp#whole-run-and-per-module-minimums). | ||
| `--ignore-exit-code 8` still makes direct test-module execution return 0, but an | ||
| all-empty or all-skipped `dotnet test` run returns 8 from the orchestrator. The | ||
| non-NuGet paths in `run-tests.yml` therefore normalize the result through | ||
| `normalize-mtp-exit-code.sh` or `normalize-mtp-exit-code.ps1`. The Deployment | ||
| E2E workflow runs its complete test command through `run-deployment-test.sh`, | ||
| which uses the same Bash normalizer before deciding whether to set its failure | ||
| output. Other nonzero exit codes remain failures. |
There was a problem hiding this comment.
Is there a bug here in the .NET SDK? Should this be consistent coming from them?
There was a problem hiding this comment.
That would mean dotnet test should have special behavior for MTP.
Description
What broke
Deployment tests can be dynamically skipped—for example, when Azure regional capacity is unavailable. MTP represents a run containing only skipped tests with exit code
8.The workflow already passed
--ignore-exit-code 8. That option normalizes the test module's result so an expected skip does not fail the job.Why it started failing
Starting with .NET 11,
dotnet testcomputes a separate result for the complete aggregated run. Even after the test module normalizes its result,dotnet testsees that no tests executed and returns exit code8again.The Deployment E2E history confirms the timing:
AzureConnectorNamespaceDeploymentTestsskipped its only test, reportedZero tests ran, and the job succeeded.dotnet testreturned exit code8and the job failed.The fix
The affected workflows capture the aggregate exit code and pass it through checked-in Bash or PowerShell normalizers. Exit code
8becomes success; actual test failures and host errors remain failures.dotnet test, so they normalize the aggregate result.The regression tests execute the checked-in scripts directly for exit codes
0,8,2, and7instead of extracting and rewriting script fragments from YAML. Conditional test selection also routes changes to the shared runner and Deployment E2E consumers.Surprises and call-outs
This fix also updates the non-NuGet paths in the shared
run-tests.ymlworkflow. Those paths have the same aggregate exit-code behavior and are used by regular, quarantine, and outerloop test lanes.Checklist
<remarks />and<code />elements on your triple slash comments?