Fix /quarantine-test and sibling test-management commands failing at Setup .NET - #19154
Open
Adam Ratzman (adamint) wants to merge 1 commit into
Open
Conversation
Check the workflow helpers out into a dedicated path so the sparse-checkout state does not leak into the full checkout that follows in the same job. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19154Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19154" |
Contributor
There was a problem hiding this comment.
Pull request overview
Separates the sparse helper checkout from the main workspace, preventing stale sparse-checkout state from breaking test-management commands.
Changes:
- Checks out workflow helpers under
.workflow-helpers. - Updates the helper import path.
- Documents the checkout-state failure mode.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/apply-test-attributes.yml |
Isolates the sparse checkout so the later full checkout contains global.json and QuarantineTools. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
Adam Ratzman (adamint)
marked this pull request as ready for review
August 7, 2026 20:11
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
/quarantine-test,/unquarantine-test,/disable-test, and/enable-testcomment commands all run in the singlequarantine_testjob in.github/workflows/apply-test-attributes.yml, so all four are affected. Both invocations on 2026-08-07 failed atSetup .NET:global.jsonis present at the repository root, and theCheckout repostep ran to completion beforeSetup .NET. The actual cause is that the "full" checkout is not full.Root cause
The job checks out twice into the same workspace directory:
Checkout workflow helpersperforms a sparse, blobless, depth-1 checkout so the comment can be parsed before the commenter is authorized.actions/checkoutwritescore.sparseCheckout=trueinto.git/configand the single pattern into.git/info/sparse-checkout.Checkout repotargets the same directory.actions/checkoutrunsgit sparse-checkout disable, which recordscore.sparseCheckout=falsein the per-worktree config and enablesextensions.worktreeConfig.actions/checkoutthen runsgit config --local --unset-all extensions.worktreeConfigto clean up that side effect, at which point git stops reading the worktree config and thecore.sparseCheckout=truewritten in step 1 is in effect again, with the pattern file still on disk.git checkout --progress --force -B main refs/remotes/origin/mainthat follows re-applies the stale sparse pattern and prunes the working tree back to the one helper file.global.jsonandtools/QuarantineToolsare therefore absent whenSetup .NETandRun QuarantineToolsexecute.Reproduced on a fork with the same action SHAs and step order, adding instrumentation between the two checkouts (https://github.com/adamint/aspire/actions/runs/31212896051):
The run then failed at
Setup .NETwith the same error, confirming that checkout ordering is correct and that the sparse state surviving into the second checkout is the defect.Fix
The helper checkout now uses
path: .workflow-helpers, so it creates its own git directory and cannot leave sparse state behind in the repository thatCheckout repopopulates. Therequirein the comment-parsing step is updated to the new location.Checkout repoclears the workspace, which removes.workflow-helpers; nothing after comment parsing reads it, and theactions/checkoutpost-step returns early when the directory is gone.No other workflow in
.github/workflowscombines a sparse and a non-sparseactions/checkouton the same path within one job.pr-docs-check.lock.ymlalso uses a sparse checkout, but it targets a separatepathand is unaffected.No issue tracks this break; the two failed runs linked above are the report.
Verification
The fixed step sequence was run on a fork with the same action SHAs (https://github.com/adamint/aspire/actions/runs/31213668553):
Setup .NETsucceeded, anddotnet run --project tools/QuarantineTools ...ran end to end and modifiedtests/Aspire.Cli.Tests/Projects/ProcessGuestLauncherTests.cs. The job, including all post-steps, completed successfully.actionlintreports the same seven pre-existing shellcheck findings before and after this change.Checklist
<remarks />and<code />elements on your triple slash comments?