Repository navigation
Temporarily disable the macOS CLI unit-test lane - #21385
Conversation
Contain the test-host hangs tracked in #21259 until a fixed runtime/toolchain is validated. Co-authored-by: Copilot App <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21385Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21385" |
Tests selector1 / 100 PR test projects · 0 PR jobs, from 1 changed file. Selected PR test projects (1 / 100)
Selected PR jobs (0)none How these were chosen — grouped by what changed🧪 Job reasonsnone Selection computed for commit |
There was a problem hiding this comment.
🔵 Needs a closer look
Failed Windows CLI and selector tests lack baseline comparisons, while the macOS scheduling changes and reduced coverage need validation and human risk assessment.
No open issues 🎉
What changed in this PR
Temporarily disables the macOS CLI unit-test lane to contain recurring test-host hangs tracked in #21259. This removes macOS unit coverage without claiming to fix the underlying hang.
Changes:
- Sets
RunOnGithubActionsMacOStofalseforAspire.Cli.Tests. - Adds a tracking link and restoration condition: validate a fixed runtime/toolchain before re-enabling.
- Leaves Windows/Linux CLI unit tests, macOS native builds, and CLI E2E configuration unchanged.
| File | Description |
|---|---|
tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj |
Disables macOS scheduling and documents when to restore it. |
Review effort: Balanced
Mitch Denny (mitchdenny)
left a comment
There was a problem hiding this comment.
Approving so we can get merging unblocked and then we can come back and try and be more selective or even solve the problem with a workaround until we get .NET 11 with the fix in it.
|
✅ No documentation update needed. docs_optional → test_only (proven false positive on a gating signal).
|
Restore the five methods disabled by bd92d7b. PR #21385 now contains the macOS CLI test-host issue at the CI lane level; the underlying runtime issue #21259 remains open. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ac380eac-c60d-4f83-9ad8-0416e791cdba
## Description Restore the macOS `Aspire.Cli.Tests` lane disabled by #21385 while retaining the pinned .NET 11 RC2 toolchain. Aspire's process-heavy CLI tests are impacted by the stopped-child process-management livelock described in [dotnet/runtime#135294](dotnet/runtime#135294). The upstream fix is merged in [dotnet/runtime#135323](dotnet/runtime#135323), but we cannot yet consume a build containing it. Related to #21259. ### Evidence and workaround The unmodified suite and a separate parallel process-test control both hung locally. The test host had stopped children and zombie children, and a native sample showed the `.NET SigHandler` repeatedly alternating between `SystemNative_WaitIdAnyExitedNoHangNoWait` and `SystemNative_WaitPidExitedNoHang`. Externally killing the identified stopped children released an unrelated `git --version` process start that had been blocked for approximately 118 seconds. This strongly connects the reproduced Aspire hang to the upstream mechanism; it does not establish that every historical CI hang has the same cause. A usable managed lock-owner dump was not obtained. Re-enable `RunOnGithubActionsMacOS` and select the existing `tests/helix/xunit.runner.json` only when building CLI tests on macOS. That config disables xUnit test-collection parallelism, removing inter-collection process-management concurrency while retaining all existing test cases and assertions. Windows/Linux runner settings, macOS native CLI archives, E2E, other test projects, SDK pins, exclusions, and timeouts are unchanged. **This is test containment, not a runtime repair.** Within-test process races remain possible, and production Aspire CLI processes on the affected runtime remain potentially exposed. No production incident is claimed to have been reproduced or fixed. Remove the macOS serialization override after adopting and validating a runtime containing dotnet/runtime#135323. ### Validation Local environment: macOS 26.7.1 (25G241), ARM64; SDK `11.0.100-rc.2.26504.105`. The test host was observed loading runtime `11.0.0-rc.2.26504.105` from the repository-local `.dotnet` directory. Three sequential full-suite runs, with different test-order seeds and no parallelism command-line override, all passed inside the existing 20-minute CI budget: | Seed | Passed | Failed | Existing skips | Total | Duration | |---|---:|---:|---:|---:|---| | 43 | 8,874 | 0 | 68 | 8,942 | 11m 45.491s | | 44 | 8,874 | 0 | 68 | 8,942 | 11m 27.924s | | 45 | 8,874 | 0 | 68 | 8,942 | 14m 22.506s | `./restore.sh` — passed. Full-suite command, run for each of seeds `43`, `44`, and `45` — passed with the results above: ```bash HOME="$short_home" DOTNET_CLI_HOME="$short_home" \ NUGET_PACKAGES="$package_cache" \ DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 DOTNET_GENERATE_ASPNET_CERTIFICATE=false \ dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj \ --no-launch-profile -- --seed "$run" \ --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" \ --hangdump --hangdump-timeout 2m --hangdump-type Mini --timeout 20m \ --report-trx --results-directory "$evidence/config-full-$run" ``` `short_home` was a securely created short, canonical `/private/tmp` directory; `package_cache` retained the existing package cache. This isolated unrelated user NuGet configuration and avoided macOS Unix-socket path-length limits. Earlier validation-environment trials failed or were stopped because of user NuGet configuration, an overlong isolated-home socket path, or `/tmp` symlink-relative paths; those are not counted as passes, and no product code or assertions were changed to accommodate them. Ten serialized process-heavy repetitions passed (107 passed / 14 skipped each), as did three expanded process-surface repetitions (211 passed / 17 skipped each). After the final one-file edit, another expanded process check passed (211 passed / 17 skipped, seed 114). The existing serialized config selected by the final change is byte-identical to the candidate used for the full repetitions; the rebuilt output config was also byte-compared successfully. Discovery display names were unchanged. ```bash dotnet test --project tests/Infrastructure.Tests/Infrastructure.Tests.csproj \ --no-launch-profile -- --filter-namespace "Infrastructure.Tests.TestTriggerMap" \ --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" ``` Passed: all 340 selector infrastructure tests. Final selector tracing attributes the single changed project file to `Aspire.Cli.Tests`, with no unattributed files. `git diff --check` passed. Hosted GitHub macOS CI has not yet been validated. Windows/Linux execution was not rerun on this macOS host. Repeated local success supports this containment workaround, not a guarantee that the defective runtime can no longer hang. ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [ ] Yes - [x] No - Did you add public API? - [ ] Yes - If yes, did you have an API Review for it? - [ ] Yes - [ ] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [ ] No - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [ ] No - [x] No Co-authored-by: Copilot App <[email protected]>
Description
Temporarily stop scheduling the entire macOS
Aspire.Cli.Testslane so the test-host hangs tracked in #21259 do not continue blocking CI until the hang detector kills the host.Set this project's
RunOnGithubActionsMacOScapability tofalseand document the restoration condition beside it. Windows/Linux CLI unit tests remain enabled. macOS native CLI archive builds, CLI E2E tests, and unrelated macOS checks are unchanged. This deliberately removes macOS CLI unit coverage; it does not repair or establish the root cause of the hang.Re-enable the lane after validating a fixed, compatible SDK/runtime. The follow-up toolchain layer is deferred until a viable fixed build and its required publishing packages are available; this change does not pin a daily SDK or modify SDK/feed configuration, test methods, or timeouts.
Related to #21259 as temporary containment only; the issue remains open.
Validation
TestEnumerationRunsheetBuildertarget, canonical matrix builder, GitHub matrix expansion, and dependency splitter before/after. The representative three-project matrix changed from 9 to 8 entries, removing exactlyAspire.Cli.Tests / macos-latest; retained entries were identical. CLI Windows/Linux capabilities andRunOnGithubActionsremaintrue, withSkipTests=false. Acquisition/Tray macOS entries and CLI E2E evaluated capabilities are unchanged.testProjectPath. A session-only adapter preserved the raw metadata and normalized only that path field before running the unmodified matrix scripts. No capabilities or repository scripts were overridden. Actual macOS/Linux execution was not performed locally.SelectTeststool against the uncommitted project change with its real solution ProjectGraph: exit 0, one affected/selected project (Aspire.Cli.Tests), zero unattributed paths. Existing Windows/Linux consumers still require its test target and runtime-only routes, so the routing map is unchanged.Repository SDK/dependency setup:
Result: passed, exit 0, using the existing pinned SDK
11.0.100-rc.2.26504.105. The initial tar-based SDK installation failed; the installer's process-localDOTNET_INSTALL_SKIP_TAR=1ZIP fallback succeeded without changing the pin.Result: failed, exit 2: 8,781 passed / 2 failed / 121 skipped, 8,904 total. Both failures hit existing five-second test timeouts:
TelemetryShutdownTests.Shutdown_HandlesBlockedDeliveryAndStorage(TimedOutCI).AgentInitClientSelectionTests.AgentInit_OpenCodeGlobalDirectoryOverrides_UseExistingJsonConfiguration(XDG_CONFIG_HOME, custom-xdg, custom-xdg/opencode).These are not claimed to be proven baseline failures; no baseline comparison was run. The initial test attempt inherited a
RestoreSourcesoverride that replaced fixture-local feeds and was intentionally aborted, not passed. The completed run above unsets that override and uses already-restored repository dependencies.Results: restore passed, exit 0; focused selector suite failed, exit 2: 318 passed / 22 failed. Failures include Bash receiving mangled Windows script paths and exiting 127, and Git-fixture cleanup access-denied errors. No unrelated infrastructure changes were made.
git diff --checkpassed.No new source-text assertions were added. macOS native builds, CLI E2E execution, and scheduled quarantine/outerloop workflows were not run locally; their unchanged configuration is not presented as execution evidence.
Checklist
<remarks />and<code />elements on your triple slash comments?