Repository navigation
[release/17.0] Give the VS Code extension's aspire --version probe a 30s budget - #22033
Closed
Mitch Denny (mitchdenny) wants to merge 1 commit into
Closed
Mitch Denny (mitchdenny) wants to merge 1 commit into
Mitch Denny (mitchdenny) wants to merge 1 commit into
Conversation
) ## Description **What failed:** On `main`, the Windows VS Code extension E2E jobs in [run 41503655043](https://github.com/microsoft/aspire/actions/runs/41503655043) failed: the [browser-debugger](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102962) job's Blazor "maps managed Edge debugging" before-all hook timed out waiting for `standalone` to reach Running, and the [apphost-tree](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102839) job hit the tree-actions "secondary AppHost" probe flake. The extension log shows `E2E CLI path is invalid` followed by `Configured CLI path is invalid`, about 1.2s after the CLI's first log write, which itself arrived about 5s after launch. ## Failure stats (14d, attempt 1) `CI` workflow on microsoft/aspire, runs created 2026-10-25 06:28 → 2026-11-08 06:28 UTC, **attempt 1 only**. Denominator: attempt-1 jobs that ran (success or failure). Hits: the failed job's log matches the signature. Jobs that lost their runner, which have no log, are excluded. Main runs have no reruns, so their flake check is the next main run of the job. | | | |---|---| | Signature | Blazor `"before all" hook for "maps managed Edge debugging…"` timing out on `standalone` Running **and** the first `aspire-vscode.debugAppHost` invocation `canceled` (the CLI was rejected). The `E2E CLI path is invalid` line is only in the extension-log artifact, not the job log, so the canceled launch is used as a proxy | | Job | VS Code extension E2E (Windows, browser-debugger) | | main pushes: hits / runs | 1 / 153 (0.65%) | | main pushes, 30d: hits / runs | 1 / 265 (0.38%). The 16 days before the 14d window add 0 hits. | | PR runs: hits / runs | 0 / 788 (0.00%); 0 PR-caused excluded | | Combined rate | 1 / 941 = **0.11%** | | Flake check | main: next main run of the job passed 1/1 | | First / last hit | 2026-11-02 / 2026-11-02 | | Still hitting main? | Last main hit: 2026-11-02. 78 main runs since the last hit (2026-11-02), with 0 hits | | Fix evidence | Local: a new real-process test (6s startup stall) fails before and passes after (single runs). This PR's CI: browser-debugger (Windows) passed 1/1. | Failing attempt-1 jobs, most recent first (1 of 1 log-verified hits): | Date (UTC) | Branch | Job | Signature excerpt | |---|---|---|---| | [2026-11-02 18:46](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102962) | **main** | VS Code extension E2E (Windows, browser-debugger) | `Timed out after 570124ms waiting for resource 'standalone' state Running` | **Verdict: WEAK.** Only **1 hit** (main, 2026-11-02), matched through a proxy signature. 78 main runs since then were clean. The other 11 before-all timeouts in this window are different: 8 are the `c:\` casing bug fixed by #21623 and 3 show a successful launch. <!-- /failure-stats --> **Why:** `tryExecuteCli` (`extension/src/utils/cliPath.ts`) validates a CLI by running `aspire --version` with a hard-coded **5s** timeout. When a runner stall delays a valid CLI's startup past 5s, the probe rejects it as invalid and the extension falls back or fails. `configInfoProvider` already gives the same `aspire --version` command a 30s budget. **Fix:** Move the named `cliVersionProbeTimeoutMs = 30_000` into `cliPath.ts`, use it in `tryExecuteCli`, and import it in `configInfoProvider` so both `--version` probes share one budget. A probe still has to complete successfully. It does not accept a CLI that hangs or exits with a non-zero code. Of the 11 attempt-1 failures of the Blazor before-all hook in the last 7 days, 8 were the `c:\` casing issue that #21623 already fixed, 1 was a DCP infrastructure timeout and 1 was on a spike branch. The remaining hit is the one this PR fixes. ## Confidence - New test `tryExecuteCli accepts a real CLI whose --version output is delayed by a startup stall` launches a real script that sleeps 6s before printing a version. On a POSIX runner it uses a `sh` script, and on Windows a `.cmd` script. - **Before** (fix reverted, test kept): fails with `false !== true`. - **After**: passes (about 6.0s). - The existing cmd-shim probe test now asserts the shared constant. - `tsc` (`compile-tests`) and `eslint` pass on the changed files. - **Not run:** the full `vscode-test` (Electron) suite and the E2E suites. The sandbox can't resolve `update.code.visualstudio.com`. Instead, I ran the compiled `cliPath` and `configInfoProvider` mocha suites with a stubbed `vscode` module. With the stub, 25 tests that need real VS Code workspace APIs fail on both unmodified `main` and this branch, and the failing set is identical. CI covers the rest. **How we stop this recurring:** Both `aspire --version` probes now share one named budget, so they can't drift apart again. The real-process test fails if the probe budget is cut back below a realistic startup stall. Refs #21600 ## 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? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - [x] No **🤖 Posted by AspireAgent (AI Agent)** Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit cd3fec7)
Closed
14 tasks
This comment has been minimized.
This comment has been minimized.
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-36-pr21912
branch
from
November 10, 2026 04:23
7841211 to
e7a0410
Compare
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-36-pr21912
branch
from
November 10, 2026 04:25
e7a0410 to
7841211
Compare
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22033Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22033" |
Mitch Denny (mitchdenny)
marked this pull request as ready for review
November 10, 2026 05:10
Mitch Denny (mitchdenny)
requested review from
Adam Ratzman (adamint) and
Ella Hathaway (ellahathaway)
as code owners
November 10, 2026 05:10
Member
Author
|
Approved for inclusion in release/17.0. Do not merge yet. |
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-36-pr21912
branch
from
November 10, 2026 06:02
7841211 to
41208d3
Compare
This comment has been minimized.
This comment has been minimized.
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-36-pr21912
branch
from
November 10, 2026 06:35
41208d3 to
7841211
Compare
Contributor
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-36-pr21912
branch
from
November 10, 2026 07:45
7841211 to
41208d3
Compare
Mitch Denny (mitchdenny)
force-pushed
the
mitchdenny-backport-17-0-36-pr21912
branch
from
November 10, 2026 08:45
41208d3 to
7841211
Compare
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
Backport of #21912 to
release/17.0(cherry-picked from cd3fec7 with no modifications). Layer 36 of 55 in the release/17.0 backport stack; stacked on #22032.Backport recommendation: No — Extension code ships from main.
Validation: Stable patch IDs match (
687f29981eb659615d31f5b122b7a3f0d61db1dc). Builds/tests not run for this unchanged cherry-pick.Backport of #21912
Checklist
<remarks />and<code />elements on your triple slash comments?