Repository navigation
Wait for endpoint metadata before tree-action E2E assertions - #21854
David Pine (IEvangelist) wants to merge 1 commit into
Conversation
Use the existing URL readiness waiter before retaining the resource snapshot for endpoint actions. Cover Running snapshots with null and empty URLs and document snapshot readiness. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21854Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21854" |
Tests selector0 / 101 PR test projects · 2 PR jobs, from 2 changed files. Selected PR test projects (0 / 101)none — no PR-gated .NET test projects run for this change. Selected PR jobs (2)
How these were chosen — grouped by what changedJob reasons
Selection computed for commit |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the test-synchronization, regression-coverage, and contributor-guidance changes.
No open issues 🎉
What changed in this PR
Fixes a stale-snapshot race in the VS Code extension’s tree-action E2E scenario that blocked #21828. The change is limited to test synchronization, regression coverage, and contributor guidance; extension product behavior is unchanged.
Changes:
- Wait for both
Runningstate and HTTP URL metadata before retaining the worker snapshot. - Add regressions covering null and empty URLs followed by HTTP metadata, confirming earlier snapshots remain stale.
- Document endpoint-readiness requirements for E2E tests.
| File | Description |
|---|---|
extension/src/test/e2eResourceReadiness.test.ts |
Adds two metadata-ordering regression tests. |
extension/src/test-e2e/treeActions.e2e.test.ts |
Uses the URL-aware readiness helper before capturing the worker. |
extension/CONTRIBUTING.md |
Documents using the helper’s returned snapshot for endpoint actions. |
Review effort: Balanced
…soft#21828) ## Description Go starters should build from their shipped files without an initial `aspire run` repairing dependencies, and Go preview validation should exercise the same runtime and native-runner paths as other AppHosts. - Ship a tidy API `go.mod` and generated `go.sum`. Add starter scenarios checking gitignore, readonly API build, tidy stability, health and weather responses; remove the Kubernetes manual-tidy workaround. - Honor the existing `--use-redis-cache false` option for Go. Omitted/true retains Redis; false omits the integration and resource. Cover all three scaffold choices with generated-source snapshots and both HTTP lifecycle variants with Docker E2E. - Add `go vet` to Go polyglot fixtures, an EF Core fixture, and Foundry tool/AKS node-pool parity. Exercise configuration-section list getters in the real Go runtime smoke. - Add Go to all six native starter-validation platforms, with official checksum-verified Go installation, timeout budget, and runtime-only selector edges for Go hosting, Go codegen, and Redis. Linux retains API/Redis readiness; containerless Windows/macOS use the cache-free starter with API readiness unchanged. - Add isolated-local-feed Go/Java scaffolding and restore to the stabilization smoke without rewriting template pins. Use a genuine Release bundled driver outside repository mode, cold consumer caches, and exact hosting-package extraction/provenance checks. Enable Java only in its subprocess. - Select languages by name rather than picker position. Restore stale Java/TypeScript SDK baselines after `aspire add` so the following `aspire restore` genuinely tests regeneration. Establish the TypeScript baseline with an actual restore before reading cache metadata. - Wait for the TypeScript Kubernetes application's actual Ready pod; exercise the Go Helm namespace/chart-version callback. Relates to microsoft#21202, microsoft#21206, microsoft#21209, microsoft#21210, microsoft#21201, and microsoft#21108. ### User-facing usage ```bash # Default retains Redis. aspire new aspire-go-starter --name GoReady --non-interactive --suppress-agent-init # Containerless starter: the Go API runs without Redis or a Docker daemon. aspire new aspire-go-starter --name GoReady --use-redis-cache false --non-interactive --suppress-agent-init ``` Both variants emit `api/go.sum` and an already-tidy API module. Its API can build with `go build -mod=readonly` without first running the AppHost's tidy resource. ### Dependencies and remaining acceptance This PR is independent of microsoft#21823. Root-module brownfield E2E microsoft#21825 merged into the microsoft#21823 feature branch, not directly into main; its delivery follows microsoft#21823. microsoft#21806 independently covers other Go init/build/vet/stable-restore scenarios. The existing stabilization gate remains disabled (`STABILIZATION_ENABLED: 'false'`); enabling it needs a separate CI/policy decision. Current `Aspire.Hosting.Java.csproj` still sets `SuppressFinalPackageVersion=true` while the Java starter pins the requested Aspire version. The corrected smoke reaches actual NuGet restore and exposes that mismatch: `Aspire.Hosting.Java (= 17.0.0)` is unavailable, the nearest local package is `17.0.0-dev`, and nuget.org versions are not considered. No pin substitution or Java release-policy change is included. Native Linux validation built the genuine stabilized Release CLI/payload and proved cold Go/Redis package restore and C# restore. This is **not a clean stabilization pass**: the unsuppressed stable pack first reproduced NU5104 on existing .NET 11 preview dependencies. The diagnostic consumer feed downgraded only NU5104 with `WarningsNotAsErrors=NU5104`; that exception is not committed. The final smoke correctly exits 1 with only Java in its failure list. The bounded shared-image fix is separate in microsoft#21849; this PR does not modify image Dockerfiles or the image-build implementation. Its `b8274fc8e0` image job and all four uploads passed, Infrastructure passed 2090/2090 including all 13 new image cases, and all 116 CLI archive E2E jobs passed. Earlier Windows extension fake-timer and DCP Docker-startup failures were investigated with same-source passing main controls; the morning live refresh reports its Final Results passing. It remains independently review-gated. Do not infer actual timeout/fallback execution from a healthy-mirror image pass. No action SHA is added or changed. No official Azure DevOps pipeline is modified. Parent's Go-minimum-version map rule/theory and the other owner's extension-e2e map block are untouched. The cache option uses existing embedded CLI inputs; no additional selector rule is required. The stabilization script remains advisory/disabled rather than being presented as a regular-PR gate. This does not close microsoft#21108: live Azure Container Apps deployment and real missing/old-toolchain E2E remain uncovered here. Cross-language lifecycle redesigns are deferred. ### CI failures diagnosed and fixed Original-head run [42116644663](https://github.com/microsoft/aspire/actions/runs/42116644663) exposed two causes: - Windows x64/ARM64 and macOS x64/ARM64 starter validation failed because Redis could not start: the Windows Docker engine pipe was absent and macOS had no Docker executable. The API correctly waited on its unhealthy dependency. Those native runners now use the supported cache-free variant; Linux and Docker E2E retain Redis coverage. No readiness assertion was removed. - `TypeScriptCodegenValidationTests` read `.codegen-hash` immediately after init, which supplies SDK sources but not restore-cache metadata. An explicit baseline restore now precedes the snapshot and stale-cache assertions. **Head `1ab3ad1e30`: all six native starter lanes passed**, including both Redis-enabled Ubuntu lanes and all four formerly failing Windows/macOS lanes, in [run 42151619597](https://github.com/microsoft/aspire/actions/runs/42151619597). Packaged CI subsequently passed [GoStarterReadinessTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721672515) (both cache choices), [GoStarterTemplateTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721672968), [JavaCodegenValidationTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721672216), and [TypeScriptCodegenValidationTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721664876). All originally failing targeted lanes/classes therefore have passing coverage. The shared image job first timed out at 45 minutes twice. Attempt 2 fetched 108 MB from Azure Ubuntu in 41 minutes 29 seconds (43.4 kB/s), versus a following GitHub download at 80.1 MB/s; GHA cache import also returned HTTP 400 service-unavailable responses. After microsoft#21849's same-input image control passed with all four uploads, one evidence-based product revalidation was started. [Attempt 3's image job passed](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127718680817) and admitted packaged E2E. No blind retries were made. The successful infrastructure control used a healthy primary mirror; it does not demonstrate timeout/fallback execution in that CI run. **Head `bd30794b9e`: historical failures and final outcome are distinct.** In [run 42167868738](https://github.com/microsoft/aspire/actions/runs/42167868738), all six native starter lanes and Go/Java/TypeScript SDK validation passed. The first [shared image job](https://github.com/microsoft/aspire/actions/runs/42167868738/job/127729647462) was canceled after 45 minutes 22 seconds with Azure Ubuntu apt downloads still running and all four uploads skipped; the initial Linux tree-actions attempt also failed on a stale immutable Running snapshot. The morning live refresh subsequently shows [Final Results passing](https://github.com/microsoft/aspire/actions/runs/42167868738/job/127754717945), including [GoStarterReadinessTests](https://github.com/microsoft/aspire/actions/runs/42167868738/job/127747615122). This session did not initiate retries. A passing later attempt does not repair the tree-actions race: its separate test-only fix microsoft#21854 still needs independent approval/merge and incorporation before claiming the race fixed in this checkout. **Latest head `0bb6569d91` requires fresh checks**, now running in [42222384609](https://github.com/microsoft/aspire/actions/runs/42222384609). Both new review findings are corrected: SDK selection accepts only exact numeric MAJOR.MINOR.PATCH package filenames, and Go starter startup is inside its existing cleanup scope. Both threads were replied to and resolved with evidence. Earlier-head CI is not presented as latest-head proof. Per the user's explicit authorization, the coordinator enabled normal native **squash auto-merge** at 05:22:46Z on 2026-11-06. It remains enabled behind required fresh checks and review requirements. No admin bypass is authorized or used; the PR is not merged. ### Stabilization review corrections The smoke now publishes a Release CLI with its real stabilized bundle outside the checkout, propagates stabilization into child payload builds, and clears inherited `ASPIRE_REPO_ROOT` for every consumer invocation. Consumer packages are isolated after the driver build so build-time extraction cannot hide a missing stable package. Successful guest restores must produce metadata for the exact hosting pins, including Redis for Go; provenance is retained in the output. The real run also exposed two stale smoke assumptions: a pre-owned parent feed mapping conflicts with scaffolding's project-local channel policy, and current C# file-based templates use `#:package Aspire.Hosting.AppHost@<version>`, not the obsolete SDK directive. The smoke now lets the CLI establish its own authoritative project-scoped feed mapping and checks the current hosting-package contract. No customer NuGet policy is changed. ### Validation - `.\restore.cmd` - passed. - `dotnet build tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-restore --nologo -v quiet` - passed, zero warnings/errors; repeated successfully after removing temporary fault injection for `0bb6569d91`. - `dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class '*.NewCommandTemplateConfigPersistenceTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - passed, 59 tests including default/true/false Go package and generated-source assertions. Existing ILCompiler NU1903 advisory was emitted. - With `ASPIRE_E2E_CLI_ARCHIVE_DIR=artifacts\readiness-ci\cli-archive-new` and `ASPIRE_E2E_DOTNET_IMAGE=aspire-e2e-polyglot-base:latest`, `dotnet test --project tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-launch-profile -- --filter-method '*.RestoreGeneratesSdkFiles_WithConfiguredToolchain' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - passed, all four npm/bun/yarn/pnpm cases against exact `1ab3ad1e30` Linux CLI/packages. The corresponding packaged CI class also passed above. - With `ASPIRE_E2E_CLI_ARCHIVE_DIR=artifacts\readiness-ci\cli-archive-new` and `ASPIRE_E2E_POLYGLOT_GO_IMAGE=aspire-go-e2e-6972:latest`, `dotnet test --project tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-launch-profile -- --filter-method '*.StarterShipsTidyApiAndServesRequests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - 1 passed/1 failed locally against exact `1ab3ad1e30`. Cache-free passed actual scaffolding, readonly API build, tidy check, API-up, health/weather and stop without a Docker socket. Redis timed out locally. The unchanged `2859e199e2` control reproduced the same timeout on this Docker Desktop host; no workaround or weaker assertion was added. **Both cases subsequently passed packaged CI**, linked above. After the cleanup-scope correction, this local command again passed cache-free and failed Redis on API readiness; the independent CLI stop log confirmed successful shutdown, while the shared terminal helper observed the prior ERR prompt. That local run is not claimed green. - Temporary fault-injection validation used that same E2E command with only the cache-free case and a shell wrapper returning HTTP 503 for the Dashboard probe after a real packaged AppHost launch - intentionally failed. Terminal output showed `dashboard-http-failed`, then cleanup invocation; the CLI log confirmed `apphost.go stopped successfully` and exit 0. The wrapper and temporary test edit were removed before the final clean build/commit. This verifies partial-start cleanup, not a successful readiness scenario. - `docker run --rm --entrypoint bash -v "${PWD}:/workspace:ro" aspire-go-e2e-6972:latest -c "sed 's/\r$//' /workspace/artifacts/readiness-ci/validate-stable-sdk-selection.sh | bash"` - passed actual smoke-script preflight cases for missing SDK, prerelease-only, mixed stable/dev/preview/rc/build-metadata/four-component filenames, multi-digit stable versions, and feed paths with spaces. The instrumented driver received `BundleVersion=17.0.0` from the mixed feed. Invalid-only feeds exited 1 with the explicit missing-stable diagnostic. Temporary harness removed after retaining logs; not a new all-language stabilization pass. - `dotnet test --project tests\Infrastructure.Tests\Infrastructure.Tests.csproj --no-launch-profile -- --filter-class '*.TestTriggerMapTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - passed, 176 tests. - `dotnet run --project tools\SelectTests -- --changed-files artifacts\readiness-changed-files.txt --explain` - passed against the real graph/map; Go hosting/codegen, Redis, starter checksum and EF Core fixture inputs select starter-validation/polyglot with zero unattributed files. Schedule-only deployment remains advisory. - `$env:DOTNET_ROOT = Join-Path $PWD '.dotnet'; $env:ASPIRE_REPO_ROOT = $PWD; .\artifacts\bin\Aspire.Cli\Debug\net11.0\aspire.exe restore --apphost tests\PolyglotAppHosts\<integration>\Go\apphost.go --non-interactive` - passed separately for `Aspire.Hosting.EntityFrameworkCore`, `Aspire.Hosting.Foundry`, and `Aspire.Hosting`, generating actual SDK bindings. - `docker run --rm --entrypoint bash -v "${PWD}:/workspace" aspire-go-e2e-6972:latest -c 'set -e; for fixture in Aspire.Hosting.EntityFrameworkCore Aspire.Hosting.Foundry Aspire.Hosting; do cd "/workspace/tests/PolyglotAppHosts/$fixture/Go"; gofmt -w apphost.go; go build -buildvcs=false -o /tmp/fixture ./...; go vet ./...; done'` - passed for all three fixtures. - `docker run --rm --entrypoint bash -v "${PWD}:/workspace:ro" aspire-go-e2e-6972:latest -c 'set -e; bash -n /workspace/.github/workflows/polyglot-validation/test-go.sh /workspace/.github/workflows/polyglot-validation/test-go-playground.sh /workspace/eng/scripts/stabilization-smoke-init-restore.sh; work=$(mktemp -d); trap "rm -rf $work" EXIT; cp /workspace/src/Aspire.Cli/Templating/Templates/go-starter/api/* "$work/"; cd "$work"; sed -i "s/{{projectNameLower}}/starter/g" go.mod; go build -mod=readonly -o /tmp/go-ready-api .; go mod tidy -diff; go vet ./...'` - passed without a dependency-repair command. - Native Linux `./restore.sh -p:SkipTestProjects=true -p:SkipPlaygroundProjects=true` - passed with the pinned SDK. - Native Linux `./dotnet.sh pack src/Aspire.Hosting.AppHost/Aspire.Hosting.AppHost.csproj -c Release -p:StabilizePackageVersion=true -p:SkipNativeBuild=true --nologo -v quiet` - failed as expected on existing NU5104 preview dependencies; not counted as a stabilization pass. - To isolate consumer behavior, the diagnostic feed used `for project in Aspire.Hosting Aspire.Hosting.AppHost Aspire.Hosting.Dotnet Aspire.TypeSystem Aspire.Hosting.CodeGeneration.Go Aspire.Hosting.CodeGeneration.Java Aspire.Hosting.Go Aspire.Hosting.Redis Aspire.Hosting.Java Aspire.Hosting.JavaScript Aspire.AppHost.Sdk Aspire.ProjectTemplates; do ./dotnet.sh pack "src/$project/$project.csproj" -c Release -p:StabilizePackageVersion=true -p:SkipNativeBuild=true -p:WarningsNotAsErrors=NU5104 --nologo -v quiet; done` - passed. No suppression is committed; Java remains `17.0.0-dev` by existing policy. - Native Linux `STABILIZATION_SMOKE_CONFIGURATION=Release ASPIRE_REPO_ROOT=/work/source bash eng/scripts/stabilization-smoke-init-restore.sh` - built the genuine stabilized Release driver/payload and completed the consumer flow. **Exit 1 is the expected Java policy failure, not an all-language pass.** Go/Redis `17.0.0` metadata names `/work/source/artifacts/packages/Release/Shipping`; C# `17.0.0` restored; Java reached real NuGet restore and rejected its absent stable pin with no nuget.org fallback. Output assertions confirmed the final failure list is exactly `java`. Sources were `1ab3ad1e30` plus the final smoke correction; no mixed PR-stamped CLI was used. - `bash -n eng/scripts/stabilization-smoke-init-restore.sh`, PowerShell parser validation of `eng\scripts\cli-starter-validation.ps1`, and `git diff --check` - passed. - Full `Infrastructure.Tests.TestTriggerMap` namespace was not passed on this Windows host: WSL's `bash.exe` cannot find `/bin/bash`; a narrowed run also encountered readonly `.git` cleanup failures. Not counted as successful validation. ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] 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 - 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: IEvangelist <7679720+IEvangelist@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…tions E2E (#21914) ## Description The Linux and Windows `tree-actions` VS Code E2E shard fails with `AssertionError: Expected e2e-worker to expose an endpoint URL.` in *routes view, copy, endpoint, log, and resource commands through tree handlers*. It is the most frequent flake since #21624. Examples: [run 41946839177 / job 126989027692](https://github.com/microsoft/aspire/actions/runs/41946839177/job/126989027692) (Linux), [run 41967348150 / job 127053704182](https://github.com/microsoft/aspire/actions/runs/41967348150/job/127053704182) (Windows, main), [run 41980257054 / job 127096573746](https://github.com/microsoft/aspire/actions/runs/41980257054/job/127096573746) (Windows). #21796 lists more. ## 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 | `Expected e2e-worker to expose an endpoint URL.` | | Job | VS Code extension E2E (Linux + Windows, tree-actions) | | main pushes: hits / runs | 8 / 306 (2.61%) | | main pushes, 30d: hits / runs | 8 / 530 (1.51%). The 16 days before the 14d window add 0 hits. | | PR runs: hits / runs | 28 / 1605 (1.74%); 0 PR-caused excluded | | Combined rate | 36 / 1911 = **1.88%** | | Flake check | main: next main run of the job passed 8/8; PR: 24/25 rerun hits passed on rerun (3 never rerun) | | First / last hit | 2026-11-05 / 2026-11-08 | | Still hitting main? | Yes, still active: last hit 2026-11-08; last main hit 2026-11-07 | | Fix evidence | Local real E2E: injected 5s delay 3/3 fail → 3/3 pass; natural run 1/1 pass. This PR's CI: tree-actions Linux and Windows passed 1/1 each. | Failing attempt-1 jobs, most recent first (10 of 34 log-verified hits): | Date (UTC) | Branch | Job | Signature excerpt | |---|---|---|---| | [2026-11-08 06:06](https://github.com/microsoft/aspire/actions/runs/42453400853/job/128650958075) | `aspireagent/vscode-bridge-scoped-fake-timers` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 05:17](https://github.com/microsoft/aspire/actions/runs/42450180289/job/128641295561) | `darc-main-252ee2c2-deac-4980-a34a-b797f49158de` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 04:40](https://github.com/microsoft/aspire/actions/runs/42447773687/job/128633232882) | `aspireagent/doctor-cancel-dcp-cleanup` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 04:32](https://github.com/microsoft/aspire/actions/runs/42447210418/job/128631545572) | `aspireagent/resource-attach-proof-resume-aborted-inspection` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-07 21:02](https://github.com/microsoft/aspire/actions/runs/42413947055/job/128538664400) | **main** | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-07 03:55](https://github.com/microsoft/aspire/actions/runs/42336149573/job/128297445902) | `sebros/resources-compact-view-regression-4abee4` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 23:20](https://github.com/microsoft/aspire/actions/runs/42311290959/job/128230943448) | **main** | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 22:50](https://github.com/microsoft/aspire/actions/runs/42307718588/job/128210216707) | `ellahathaway-stop-idle-extension-polling` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 20:25](https://github.com/microsoft/aspire/actions/runs/42288258477/job/128147538335) | **main** | VS Code extension E2E (Linux, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 20:20](https://github.com/microsoft/aspire/actions/runs/42287581178/job/128143472756) | `ellahathaway-clarify-agent-init-output` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | A strict re-scan of the job logs confirmed 34 of the 36 hits counted above; the table lists only confirmed hits. The rates above use the original count. **Verdict: STRONG.** The most frequent signature here: 36 hits since 2026-11-05 (8 on main), still hitting today. 24 of the 25 PR hits that were rerun passed on rerun, and all 8 main hits passed on the next main run. The real-E2E before/after repro shows the exact CI assertion. The PR's own CI is 1 run per OS. That is not statistical proof on its own: at a 1.9% rate, ~160 clean runs are needed for 95% confidence. <!-- /failure-stats --> **Why:** the spec captures `e2e-worker` from the first snapshot where it is `Running` and later reads its endpoint URL from that same object. DCP activates the worker's endpoint shortly after the resource reaches `Running`, and the backchannel omits inactive URLs, so the first `Running` snapshot can have `urls: []`. The URL-bearing snapshot arrives a few milliseconds later, but the spec never re-reads it. Since #21624, the worker reaches `Running` after the extension's `describe --follow` attaches, so this URL-less snapshot is now visible to the spec. **Fix:** wait with the existing `waitForRunningResourceWithUrl('e2e-worker', 'http:', 180000)` helper (already used by the Azure Functions spec) instead of `waitForResourceState('e2e-worker', ['Running'])`. This is a test-only change, and the endpoint assertion is unchanged. Fixes #21796 ## Confidence - **Real E2E, paired before/after (Linux, xvfb, real VS Code 1.130.0, CLI/DCP/VSIX/NuGets from main CI run 42413947055):** a local-only CLI wrapper delays the first URL-bearing `Running` `e2e-worker` line from `describe --follow` by 5s. The 5s delay is well above the 200ms state poll interval, so the URL-less snapshot is always observed. - Before (spec on `origin/main`): **3/3 failed** (6 passing, 1 failing), each with the exact CI assertion. - After (this PR): **3/3 passed** (7/7). - **Natural (no injection) run with the fix:** 1/1 passed (7/7). Locally, the URL-bearing `Running` snapshot followed the URL-less one by 2ms. - **Other checks:** eslint on the spec, `tsc` for both `tsconfig.e2e.json` and the unit project, and `e2eResourceReadiness.test.ts` (9/9, run with mocha directly) all pass. - **Not run locally:** the Windows `tree-actions` shard, other E2E shards, and `vscode-test`-hosted unit tests (the VS Code download host is blocked in my environment). CI covers these. **How we stop this recurring:** E2E specs that read resource URLs should wait on `waitForRunningResourceWithUrl` instead of a state-only `Running` gate, because state and URL activation arrive as separate snapshots. Related: #21854 made the same change but was closed without being merged. ## 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 (the change is to an E2E scenario test; the helper it uses already has unit coverage) - [ ] 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>
## Description Go starters should build from their shipped files without an initial `aspire run` repairing dependencies, and Go preview validation should exercise the same runtime and native-runner paths as other AppHosts. - Ship a tidy API `go.mod` and generated `go.sum`. Add starter scenarios checking gitignore, readonly API build, tidy stability, health and weather responses; remove the Kubernetes manual-tidy workaround. - Honor the existing `--use-redis-cache false` option for Go. Omitted/true retains Redis; false omits the integration and resource. Cover all three scaffold choices with generated-source snapshots and both HTTP lifecycle variants with Docker E2E. - Add `go vet` to Go polyglot fixtures, an EF Core fixture, and Foundry tool/AKS node-pool parity. Exercise configuration-section list getters in the real Go runtime smoke. - Add Go to all six native starter-validation platforms, with official checksum-verified Go installation, timeout budget, and runtime-only selector edges for Go hosting, Go codegen, and Redis. Linux retains API/Redis readiness; containerless Windows/macOS use the cache-free starter with API readiness unchanged. - Add isolated-local-feed Go/Java scaffolding and restore to the stabilization smoke without rewriting template pins. Use a genuine Release bundled driver outside repository mode, cold consumer caches, and exact hosting-package extraction/provenance checks. Enable Java only in its subprocess. - Select languages by name rather than picker position. Restore stale Java/TypeScript SDK baselines after `aspire add` so the following `aspire restore` genuinely tests regeneration. Establish the TypeScript baseline with an actual restore before reading cache metadata. - Wait for the TypeScript Kubernetes application's actual Ready pod; exercise the Go Helm namespace/chart-version callback. Relates to #21202, #21206, #21209, #21210, #21201, and #21108. ### User-facing usage ```bash # Default retains Redis. aspire new aspire-go-starter --name GoReady --non-interactive --suppress-agent-init # Containerless starter: the Go API runs without Redis or a Docker daemon. aspire new aspire-go-starter --name GoReady --use-redis-cache false --non-interactive --suppress-agent-init ``` Both variants emit `api/go.sum` and an already-tidy API module. Its API can build with `go build -mod=readonly` without first running the AppHost's tidy resource. ### Dependencies and remaining acceptance This PR is independent of #21823. Root-module brownfield E2E #21825 merged into the #21823 feature branch, not directly into main; its delivery follows #21823. #21806 independently covers other Go init/build/vet/stable-restore scenarios. The existing stabilization gate remains disabled (`STABILIZATION_ENABLED: 'false'`); enabling it needs a separate CI/policy decision. Current `Aspire.Hosting.Java.csproj` still sets `SuppressFinalPackageVersion=true` while the Java starter pins the requested Aspire version. The corrected smoke reaches actual NuGet restore and exposes that mismatch: `Aspire.Hosting.Java (= 17.0.0)` is unavailable, the nearest local package is `17.0.0-dev`, and nuget.org versions are not considered. No pin substitution or Java release-policy change is included. Native Linux validation built the genuine stabilized Release CLI/payload and proved cold Go/Redis package restore and C# restore. This is **not a clean stabilization pass**: the unsuppressed stable pack first reproduced NU5104 on existing .NET 11 preview dependencies. The diagnostic consumer feed downgraded only NU5104 with `WarningsNotAsErrors=NU5104`; that exception is not committed. The final smoke correctly exits 1 with only Java in its failure list. The bounded shared-image fix is separate in #21849; this PR does not modify image Dockerfiles or the image-build implementation. Its `b8274fc8e0` image job and all four uploads passed, Infrastructure passed 2090/2090 including all 13 new image cases, and all 116 CLI archive E2E jobs passed. Earlier Windows extension fake-timer and DCP Docker-startup failures were investigated with same-source passing main controls; the morning live refresh reports its Final Results passing. It remains independently review-gated. Do not infer actual timeout/fallback execution from a healthy-mirror image pass. No action SHA is added or changed. No official Azure DevOps pipeline is modified. Parent's Go-minimum-version map rule/theory and the other owner's extension-e2e map block are untouched. The cache option uses existing embedded CLI inputs; no additional selector rule is required. The stabilization script remains advisory/disabled rather than being presented as a regular-PR gate. This does not close #21108: live Azure Container Apps deployment and real missing/old-toolchain E2E remain uncovered here. Cross-language lifecycle redesigns are deferred. ### CI failures diagnosed and fixed Original-head run [42116644663](https://github.com/microsoft/aspire/actions/runs/42116644663) exposed two causes: - Windows x64/ARM64 and macOS x64/ARM64 starter validation failed because Redis could not start: the Windows Docker engine pipe was absent and macOS had no Docker executable. The API correctly waited on its unhealthy dependency. Those native runners now use the supported cache-free variant; Linux and Docker E2E retain Redis coverage. No readiness assertion was removed. - `TypeScriptCodegenValidationTests` read `.codegen-hash` immediately after init, which supplies SDK sources but not restore-cache metadata. An explicit baseline restore now precedes the snapshot and stale-cache assertions. **Head `1ab3ad1e30`: all six native starter lanes passed**, including both Redis-enabled Ubuntu lanes and all four formerly failing Windows/macOS lanes, in [run 42151619597](https://github.com/microsoft/aspire/actions/runs/42151619597). Packaged CI subsequently passed [GoStarterReadinessTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721672515) (both cache choices), [GoStarterTemplateTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721672968), [JavaCodegenValidationTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721672216), and [TypeScriptCodegenValidationTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721664876). All originally failing targeted lanes/classes therefore have passing coverage. The shared image job first timed out at 45 minutes twice. Attempt 2 fetched 108 MB from Azure Ubuntu in 41 minutes 29 seconds (43.4 kB/s), versus a following GitHub download at 80.1 MB/s; GHA cache import also returned HTTP 400 service-unavailable responses. After #21849's same-input image control passed with all four uploads, one evidence-based product revalidation was started. [Attempt 3's image job passed](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127718680817) and admitted packaged E2E. No blind retries were made. The successful infrastructure control used a healthy primary mirror; it does not demonstrate timeout/fallback execution in that CI run. **Head `bd30794b9e`: historical failures and final outcome are distinct.** In [run 42167868738](https://github.com/microsoft/aspire/actions/runs/42167868738), all six native starter lanes and Go/Java/TypeScript SDK validation passed. The first [shared image job](https://github.com/microsoft/aspire/actions/runs/42167868738/job/127729647462) was canceled after 45 minutes 22 seconds with Azure Ubuntu apt downloads still running and all four uploads skipped; the initial Linux tree-actions attempt also failed on a stale immutable Running snapshot. The morning live refresh subsequently shows [Final Results passing](https://github.com/microsoft/aspire/actions/runs/42167868738/job/127754717945), including [GoStarterReadinessTests](https://github.com/microsoft/aspire/actions/runs/42167868738/job/127747615122). This session did not initiate retries. A passing later attempt does not repair the tree-actions race: its separate test-only fix #21854 still needs independent approval/merge and incorporation before claiming the race fixed in this checkout. **Latest head `0bb6569d91` requires fresh checks**, now running in [42222384609](https://github.com/microsoft/aspire/actions/runs/42222384609). Both new review findings are corrected: SDK selection accepts only exact numeric MAJOR.MINOR.PATCH package filenames, and Go starter startup is inside its existing cleanup scope. Both threads were replied to and resolved with evidence. Earlier-head CI is not presented as latest-head proof. Per the user's explicit authorization, the coordinator enabled normal native **squash auto-merge** at 05:22:46Z on 2026-11-06. It remains enabled behind required fresh checks and review requirements. No admin bypass is authorized or used; the PR is not merged. ### Stabilization review corrections The smoke now publishes a Release CLI with its real stabilized bundle outside the checkout, propagates stabilization into child payload builds, and clears inherited `ASPIRE_REPO_ROOT` for every consumer invocation. Consumer packages are isolated after the driver build so build-time extraction cannot hide a missing stable package. Successful guest restores must produce metadata for the exact hosting pins, including Redis for Go; provenance is retained in the output. The real run also exposed two stale smoke assumptions: a pre-owned parent feed mapping conflicts with scaffolding's project-local channel policy, and current C# file-based templates use `#:package Aspire.Hosting.AppHost@<version>`, not the obsolete SDK directive. The smoke now lets the CLI establish its own authoritative project-scoped feed mapping and checks the current hosting-package contract. No customer NuGet policy is changed. ### Validation - `.\restore.cmd` - passed. - `dotnet build tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-restore --nologo -v quiet` - passed, zero warnings/errors; repeated successfully after removing temporary fault injection for `0bb6569d91`. - `dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class '*.NewCommandTemplateConfigPersistenceTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - passed, 59 tests including default/true/false Go package and generated-source assertions. Existing ILCompiler NU1903 advisory was emitted. - With `ASPIRE_E2E_CLI_ARCHIVE_DIR=artifacts\readiness-ci\cli-archive-new` and `ASPIRE_E2E_DOTNET_IMAGE=aspire-e2e-polyglot-base:latest`, `dotnet test --project tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-launch-profile -- --filter-method '*.RestoreGeneratesSdkFiles_WithConfiguredToolchain' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - passed, all four npm/bun/yarn/pnpm cases against exact `1ab3ad1e30` Linux CLI/packages. The corresponding packaged CI class also passed above. - With `ASPIRE_E2E_CLI_ARCHIVE_DIR=artifacts\readiness-ci\cli-archive-new` and `ASPIRE_E2E_POLYGLOT_GO_IMAGE=aspire-go-e2e-6972:latest`, `dotnet test --project tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-launch-profile -- --filter-method '*.StarterShipsTidyApiAndServesRequests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - 1 passed/1 failed locally against exact `1ab3ad1e30`. Cache-free passed actual scaffolding, readonly API build, tidy check, API-up, health/weather and stop without a Docker socket. Redis timed out locally. The unchanged `2859e199e2` control reproduced the same timeout on this Docker Desktop host; no workaround or weaker assertion was added. **Both cases subsequently passed packaged CI**, linked above. After the cleanup-scope correction, this local command again passed cache-free and failed Redis on API readiness; the independent CLI stop log confirmed successful shutdown, while the shared terminal helper observed the prior ERR prompt. That local run is not claimed green. - Temporary fault-injection validation used that same E2E command with only the cache-free case and a shell wrapper returning HTTP 503 for the Dashboard probe after a real packaged AppHost launch - intentionally failed. Terminal output showed `dashboard-http-failed`, then cleanup invocation; the CLI log confirmed `apphost.go stopped successfully` and exit 0. The wrapper and temporary test edit were removed before the final clean build/commit. This verifies partial-start cleanup, not a successful readiness scenario. - `docker run --rm --entrypoint bash -v "${PWD}:/workspace:ro" aspire-go-e2e-6972:latest -c "sed 's/\r$//' /workspace/artifacts/readiness-ci/validate-stable-sdk-selection.sh | bash"` - passed actual smoke-script preflight cases for missing SDK, prerelease-only, mixed stable/dev/preview/rc/build-metadata/four-component filenames, multi-digit stable versions, and feed paths with spaces. The instrumented driver received `BundleVersion=17.0.0` from the mixed feed. Invalid-only feeds exited 1 with the explicit missing-stable diagnostic. Temporary harness removed after retaining logs; not a new all-language stabilization pass. - `dotnet test --project tests\Infrastructure.Tests\Infrastructure.Tests.csproj --no-launch-profile -- --filter-class '*.TestTriggerMapTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - passed, 176 tests. - `dotnet run --project tools\SelectTests -- --changed-files artifacts\readiness-changed-files.txt --explain` - passed against the real graph/map; Go hosting/codegen, Redis, starter checksum and EF Core fixture inputs select starter-validation/polyglot with zero unattributed files. Schedule-only deployment remains advisory. - `$env:DOTNET_ROOT = Join-Path $PWD '.dotnet'; $env:ASPIRE_REPO_ROOT = $PWD; .\artifacts\bin\Aspire.Cli\Debug\net11.0\aspire.exe restore --apphost tests\PolyglotAppHosts\<integration>\Go\apphost.go --non-interactive` - passed separately for `Aspire.Hosting.EntityFrameworkCore`, `Aspire.Hosting.Foundry`, and `Aspire.Hosting`, generating actual SDK bindings. - `docker run --rm --entrypoint bash -v "${PWD}:/workspace" aspire-go-e2e-6972:latest -c 'set -e; for fixture in Aspire.Hosting.EntityFrameworkCore Aspire.Hosting.Foundry Aspire.Hosting; do cd "/workspace/tests/PolyglotAppHosts/$fixture/Go"; gofmt -w apphost.go; go build -buildvcs=false -o /tmp/fixture ./...; go vet ./...; done'` - passed for all three fixtures. - `docker run --rm --entrypoint bash -v "${PWD}:/workspace:ro" aspire-go-e2e-6972:latest -c 'set -e; bash -n /workspace/.github/workflows/polyglot-validation/test-go.sh /workspace/.github/workflows/polyglot-validation/test-go-playground.sh /workspace/eng/scripts/stabilization-smoke-init-restore.sh; work=$(mktemp -d); trap "rm -rf $work" EXIT; cp /workspace/src/Aspire.Cli/Templating/Templates/go-starter/api/* "$work/"; cd "$work"; sed -i "s/{{projectNameLower}}/starter/g" go.mod; go build -mod=readonly -o /tmp/go-ready-api .; go mod tidy -diff; go vet ./...'` - passed without a dependency-repair command. - Native Linux `./restore.sh -p:SkipTestProjects=true -p:SkipPlaygroundProjects=true` - passed with the pinned SDK. - Native Linux `./dotnet.sh pack src/Aspire.Hosting.AppHost/Aspire.Hosting.AppHost.csproj -c Release -p:StabilizePackageVersion=true -p:SkipNativeBuild=true --nologo -v quiet` - failed as expected on existing NU5104 preview dependencies; not counted as a stabilization pass. - To isolate consumer behavior, the diagnostic feed used `for project in Aspire.Hosting Aspire.Hosting.AppHost Aspire.Hosting.Dotnet Aspire.TypeSystem Aspire.Hosting.CodeGeneration.Go Aspire.Hosting.CodeGeneration.Java Aspire.Hosting.Go Aspire.Hosting.Redis Aspire.Hosting.Java Aspire.Hosting.JavaScript Aspire.AppHost.Sdk Aspire.ProjectTemplates; do ./dotnet.sh pack "src/$project/$project.csproj" -c Release -p:StabilizePackageVersion=true -p:SkipNativeBuild=true -p:WarningsNotAsErrors=NU5104 --nologo -v quiet; done` - passed. No suppression is committed; Java remains `17.0.0-dev` by existing policy. - Native Linux `STABILIZATION_SMOKE_CONFIGURATION=Release ASPIRE_REPO_ROOT=/work/source bash eng/scripts/stabilization-smoke-init-restore.sh` - built the genuine stabilized Release driver/payload and completed the consumer flow. **Exit 1 is the expected Java policy failure, not an all-language pass.** Go/Redis `17.0.0` metadata names `/work/source/artifacts/packages/Release/Shipping`; C# `17.0.0` restored; Java reached real NuGet restore and rejected its absent stable pin with no nuget.org fallback. Output assertions confirmed the final failure list is exactly `java`. Sources were `1ab3ad1e30` plus the final smoke correction; no mixed PR-stamped CLI was used. - `bash -n eng/scripts/stabilization-smoke-init-restore.sh`, PowerShell parser validation of `eng\scripts\cli-starter-validation.ps1`, and `git diff --check` - passed. - Full `Infrastructure.Tests.TestTriggerMap` namespace was not passed on this Windows host: WSL's `bash.exe` cannot find `/bin/bash`; a narrowed run also encountered readonly `.git` cleanup failures. Not counted as successful validation. ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] 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 - 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: IEvangelist <7679720+IEvangelist@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 5138b2a)
…tions E2E (#21914) ## Description The Linux and Windows `tree-actions` VS Code E2E shard fails with `AssertionError: Expected e2e-worker to expose an endpoint URL.` in *routes view, copy, endpoint, log, and resource commands through tree handlers*. It is the most frequent flake since #21624. Examples: [run 41946839177 / job 126989027692](https://github.com/microsoft/aspire/actions/runs/41946839177/job/126989027692) (Linux), [run 41967348150 / job 127053704182](https://github.com/microsoft/aspire/actions/runs/41967348150/job/127053704182) (Windows, main), [run 41980257054 / job 127096573746](https://github.com/microsoft/aspire/actions/runs/41980257054/job/127096573746) (Windows). #21796 lists more. ## 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 | `Expected e2e-worker to expose an endpoint URL.` | | Job | VS Code extension E2E (Linux + Windows, tree-actions) | | main pushes: hits / runs | 8 / 306 (2.61%) | | main pushes, 30d: hits / runs | 8 / 530 (1.51%). The 16 days before the 14d window add 0 hits. | | PR runs: hits / runs | 28 / 1605 (1.74%); 0 PR-caused excluded | | Combined rate | 36 / 1911 = **1.88%** | | Flake check | main: next main run of the job passed 8/8; PR: 24/25 rerun hits passed on rerun (3 never rerun) | | First / last hit | 2026-11-05 / 2026-11-08 | | Still hitting main? | Yes, still active: last hit 2026-11-08; last main hit 2026-11-07 | | Fix evidence | Local real E2E: injected 5s delay 3/3 fail → 3/3 pass; natural run 1/1 pass. This PR's CI: tree-actions Linux and Windows passed 1/1 each. | Failing attempt-1 jobs, most recent first (10 of 34 log-verified hits): | Date (UTC) | Branch | Job | Signature excerpt | |---|---|---|---| | [2026-11-08 06:06](https://github.com/microsoft/aspire/actions/runs/42453400853/job/128650958075) | `aspireagent/vscode-bridge-scoped-fake-timers` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 05:17](https://github.com/microsoft/aspire/actions/runs/42450180289/job/128641295561) | `darc-main-252ee2c2-deac-4980-a34a-b797f49158de` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 04:40](https://github.com/microsoft/aspire/actions/runs/42447773687/job/128633232882) | `aspireagent/doctor-cancel-dcp-cleanup` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 04:32](https://github.com/microsoft/aspire/actions/runs/42447210418/job/128631545572) | `aspireagent/resource-attach-proof-resume-aborted-inspection` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-07 21:02](https://github.com/microsoft/aspire/actions/runs/42413947055/job/128538664400) | **main** | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-07 03:55](https://github.com/microsoft/aspire/actions/runs/42336149573/job/128297445902) | `sebros/resources-compact-view-regression-4abee4` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 23:20](https://github.com/microsoft/aspire/actions/runs/42311290959/job/128230943448) | **main** | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 22:50](https://github.com/microsoft/aspire/actions/runs/42307718588/job/128210216707) | `ellahathaway-stop-idle-extension-polling` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 20:25](https://github.com/microsoft/aspire/actions/runs/42288258477/job/128147538335) | **main** | VS Code extension E2E (Linux, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 20:20](https://github.com/microsoft/aspire/actions/runs/42287581178/job/128143472756) | `ellahathaway-clarify-agent-init-output` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | A strict re-scan of the job logs confirmed 34 of the 36 hits counted above; the table lists only confirmed hits. The rates above use the original count. **Verdict: STRONG.** The most frequent signature here: 36 hits since 2026-11-05 (8 on main), still hitting today. 24 of the 25 PR hits that were rerun passed on rerun, and all 8 main hits passed on the next main run. The real-E2E before/after repro shows the exact CI assertion. The PR's own CI is 1 run per OS. That is not statistical proof on its own: at a 1.9% rate, ~160 clean runs are needed for 95% confidence. <!-- /failure-stats --> **Why:** the spec captures `e2e-worker` from the first snapshot where it is `Running` and later reads its endpoint URL from that same object. DCP activates the worker's endpoint shortly after the resource reaches `Running`, and the backchannel omits inactive URLs, so the first `Running` snapshot can have `urls: []`. The URL-bearing snapshot arrives a few milliseconds later, but the spec never re-reads it. Since #21624, the worker reaches `Running` after the extension's `describe --follow` attaches, so this URL-less snapshot is now visible to the spec. **Fix:** wait with the existing `waitForRunningResourceWithUrl('e2e-worker', 'http:', 180000)` helper (already used by the Azure Functions spec) instead of `waitForResourceState('e2e-worker', ['Running'])`. This is a test-only change, and the endpoint assertion is unchanged. Fixes #21796 ## Confidence - **Real E2E, paired before/after (Linux, xvfb, real VS Code 1.130.0, CLI/DCP/VSIX/NuGets from main CI run 42413947055):** a local-only CLI wrapper delays the first URL-bearing `Running` `e2e-worker` line from `describe --follow` by 5s. The 5s delay is well above the 200ms state poll interval, so the URL-less snapshot is always observed. - Before (spec on `origin/main`): **3/3 failed** (6 passing, 1 failing), each with the exact CI assertion. - After (this PR): **3/3 passed** (7/7). - **Natural (no injection) run with the fix:** 1/1 passed (7/7). Locally, the URL-bearing `Running` snapshot followed the URL-less one by 2ms. - **Other checks:** eslint on the spec, `tsc` for both `tsconfig.e2e.json` and the unit project, and `e2eResourceReadiness.test.ts` (9/9, run with mocha directly) all pass. - **Not run locally:** the Windows `tree-actions` shard, other E2E shards, and `vscode-test`-hosted unit tests (the VS Code download host is blocked in my environment). CI covers these. **How we stop this recurring:** E2E specs that read resource URLs should wait on `waitForRunningResourceWithUrl` instead of a state-only `Running` gate, because state and URL activation arrive as separate snapshots. Related: #21854 made the same change but was closed without being merged. ## 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 (the change is to an E2E scenario test; the helper it uses already has unit coverage) - [ ] 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 37d2680)
## Description Go starters should build from their shipped files without an initial `aspire run` repairing dependencies, and Go preview validation should exercise the same runtime and native-runner paths as other AppHosts. - Ship a tidy API `go.mod` and generated `go.sum`. Add starter scenarios checking gitignore, readonly API build, tidy stability, health and weather responses; remove the Kubernetes manual-tidy workaround. - Honor the existing `--use-redis-cache false` option for Go. Omitted/true retains Redis; false omits the integration and resource. Cover all three scaffold choices with generated-source snapshots and both HTTP lifecycle variants with Docker E2E. - Add `go vet` to Go polyglot fixtures, an EF Core fixture, and Foundry tool/AKS node-pool parity. Exercise configuration-section list getters in the real Go runtime smoke. - Add Go to all six native starter-validation platforms, with official checksum-verified Go installation, timeout budget, and runtime-only selector edges for Go hosting, Go codegen, and Redis. Linux retains API/Redis readiness; containerless Windows/macOS use the cache-free starter with API readiness unchanged. - Add isolated-local-feed Go/Java scaffolding and restore to the stabilization smoke without rewriting template pins. Use a genuine Release bundled driver outside repository mode, cold consumer caches, and exact hosting-package extraction/provenance checks. Enable Java only in its subprocess. - Select languages by name rather than picker position. Restore stale Java/TypeScript SDK baselines after `aspire add` so the following `aspire restore` genuinely tests regeneration. Establish the TypeScript baseline with an actual restore before reading cache metadata. - Wait for the TypeScript Kubernetes application's actual Ready pod; exercise the Go Helm namespace/chart-version callback. Relates to #21202, #21206, #21209, #21210, #21201, and #21108. ### User-facing usage ```bash # Default retains Redis. aspire new aspire-go-starter --name GoReady --non-interactive --suppress-agent-init # Containerless starter: the Go API runs without Redis or a Docker daemon. aspire new aspire-go-starter --name GoReady --use-redis-cache false --non-interactive --suppress-agent-init ``` Both variants emit `api/go.sum` and an already-tidy API module. Its API can build with `go build -mod=readonly` without first running the AppHost's tidy resource. ### Dependencies and remaining acceptance This PR is independent of #21823. Root-module brownfield E2E #21825 merged into the #21823 feature branch, not directly into main; its delivery follows #21823. #21806 independently covers other Go init/build/vet/stable-restore scenarios. The existing stabilization gate remains disabled (`STABILIZATION_ENABLED: 'false'`); enabling it needs a separate CI/policy decision. Current `Aspire.Hosting.Java.csproj` still sets `SuppressFinalPackageVersion=true` while the Java starter pins the requested Aspire version. The corrected smoke reaches actual NuGet restore and exposes that mismatch: `Aspire.Hosting.Java (= 17.0.0)` is unavailable, the nearest local package is `17.0.0-dev`, and nuget.org versions are not considered. No pin substitution or Java release-policy change is included. Native Linux validation built the genuine stabilized Release CLI/payload and proved cold Go/Redis package restore and C# restore. This is **not a clean stabilization pass**: the unsuppressed stable pack first reproduced NU5104 on existing .NET 11 preview dependencies. The diagnostic consumer feed downgraded only NU5104 with `WarningsNotAsErrors=NU5104`; that exception is not committed. The final smoke correctly exits 1 with only Java in its failure list. The bounded shared-image fix is separate in #21849; this PR does not modify image Dockerfiles or the image-build implementation. Its `b8274fc8e0` image job and all four uploads passed, Infrastructure passed 2090/2090 including all 13 new image cases, and all 116 CLI archive E2E jobs passed. Earlier Windows extension fake-timer and DCP Docker-startup failures were investigated with same-source passing main controls; the morning live refresh reports its Final Results passing. It remains independently review-gated. Do not infer actual timeout/fallback execution from a healthy-mirror image pass. No action SHA is added or changed. No official Azure DevOps pipeline is modified. Parent's Go-minimum-version map rule/theory and the other owner's extension-e2e map block are untouched. The cache option uses existing embedded CLI inputs; no additional selector rule is required. The stabilization script remains advisory/disabled rather than being presented as a regular-PR gate. This does not close #21108: live Azure Container Apps deployment and real missing/old-toolchain E2E remain uncovered here. Cross-language lifecycle redesigns are deferred. ### CI failures diagnosed and fixed Original-head run [42116644663](https://github.com/microsoft/aspire/actions/runs/42116644663) exposed two causes: - Windows x64/ARM64 and macOS x64/ARM64 starter validation failed because Redis could not start: the Windows Docker engine pipe was absent and macOS had no Docker executable. The API correctly waited on its unhealthy dependency. Those native runners now use the supported cache-free variant; Linux and Docker E2E retain Redis coverage. No readiness assertion was removed. - `TypeScriptCodegenValidationTests` read `.codegen-hash` immediately after init, which supplies SDK sources but not restore-cache metadata. An explicit baseline restore now precedes the snapshot and stale-cache assertions. **Head `1ab3ad1e30`: all six native starter lanes passed**, including both Redis-enabled Ubuntu lanes and all four formerly failing Windows/macOS lanes, in [run 42151619597](https://github.com/microsoft/aspire/actions/runs/42151619597). Packaged CI subsequently passed [GoStarterReadinessTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721672515) (both cache choices), [GoStarterTemplateTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721672968), [JavaCodegenValidationTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721672216), and [TypeScriptCodegenValidationTests](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127721664876). All originally failing targeted lanes/classes therefore have passing coverage. The shared image job first timed out at 45 minutes twice. Attempt 2 fetched 108 MB from Azure Ubuntu in 41 minutes 29 seconds (43.4 kB/s), versus a following GitHub download at 80.1 MB/s; GHA cache import also returned HTTP 400 service-unavailable responses. After #21849's same-input image control passed with all four uploads, one evidence-based product revalidation was started. [Attempt 3's image job passed](https://github.com/microsoft/aspire/actions/runs/42151619597/job/127718680817) and admitted packaged E2E. No blind retries were made. The successful infrastructure control used a healthy primary mirror; it does not demonstrate timeout/fallback execution in that CI run. **Head `bd30794b9e`: historical failures and final outcome are distinct.** In [run 42167868738](https://github.com/microsoft/aspire/actions/runs/42167868738), all six native starter lanes and Go/Java/TypeScript SDK validation passed. The first [shared image job](https://github.com/microsoft/aspire/actions/runs/42167868738/job/127729647462) was canceled after 45 minutes 22 seconds with Azure Ubuntu apt downloads still running and all four uploads skipped; the initial Linux tree-actions attempt also failed on a stale immutable Running snapshot. The morning live refresh subsequently shows [Final Results passing](https://github.com/microsoft/aspire/actions/runs/42167868738/job/127754717945), including [GoStarterReadinessTests](https://github.com/microsoft/aspire/actions/runs/42167868738/job/127747615122). This session did not initiate retries. A passing later attempt does not repair the tree-actions race: its separate test-only fix #21854 still needs independent approval/merge and incorporation before claiming the race fixed in this checkout. **Latest head `0bb6569d91` requires fresh checks**, now running in [42222384609](https://github.com/microsoft/aspire/actions/runs/42222384609). Both new review findings are corrected: SDK selection accepts only exact numeric MAJOR.MINOR.PATCH package filenames, and Go starter startup is inside its existing cleanup scope. Both threads were replied to and resolved with evidence. Earlier-head CI is not presented as latest-head proof. Per the user's explicit authorization, the coordinator enabled normal native **squash auto-merge** at 05:22:46Z on 2026-11-06. It remains enabled behind required fresh checks and review requirements. No admin bypass is authorized or used; the PR is not merged. ### Stabilization review corrections The smoke now publishes a Release CLI with its real stabilized bundle outside the checkout, propagates stabilization into child payload builds, and clears inherited `ASPIRE_REPO_ROOT` for every consumer invocation. Consumer packages are isolated after the driver build so build-time extraction cannot hide a missing stable package. Successful guest restores must produce metadata for the exact hosting pins, including Redis for Go; provenance is retained in the output. The real run also exposed two stale smoke assumptions: a pre-owned parent feed mapping conflicts with scaffolding's project-local channel policy, and current C# file-based templates use `#:package Aspire.Hosting.AppHost@<version>`, not the obsolete SDK directive. The smoke now lets the CLI establish its own authoritative project-scoped feed mapping and checks the current hosting-package contract. No customer NuGet policy is changed. ### Validation - `.\restore.cmd` - passed. - `dotnet build tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-restore --nologo -v quiet` - passed, zero warnings/errors; repeated successfully after removing temporary fault injection for `0bb6569d91`. - `dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class '*.NewCommandTemplateConfigPersistenceTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - passed, 59 tests including default/true/false Go package and generated-source assertions. Existing ILCompiler NU1903 advisory was emitted. - With `ASPIRE_E2E_CLI_ARCHIVE_DIR=artifacts\readiness-ci\cli-archive-new` and `ASPIRE_E2E_DOTNET_IMAGE=aspire-e2e-polyglot-base:latest`, `dotnet test --project tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-launch-profile -- --filter-method '*.RestoreGeneratesSdkFiles_WithConfiguredToolchain' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - passed, all four npm/bun/yarn/pnpm cases against exact `1ab3ad1e30` Linux CLI/packages. The corresponding packaged CI class also passed above. - With `ASPIRE_E2E_CLI_ARCHIVE_DIR=artifacts\readiness-ci\cli-archive-new` and `ASPIRE_E2E_POLYGLOT_GO_IMAGE=aspire-go-e2e-6972:latest`, `dotnet test --project tests\Aspire.Cli.EndToEnd.Tests\Aspire.Cli.EndToEnd.Tests.csproj --no-launch-profile -- --filter-method '*.StarterShipsTidyApiAndServesRequests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - 1 passed/1 failed locally against exact `1ab3ad1e30`. Cache-free passed actual scaffolding, readonly API build, tidy check, API-up, health/weather and stop without a Docker socket. Redis timed out locally. The unchanged `2859e199e2` control reproduced the same timeout on this Docker Desktop host; no workaround or weaker assertion was added. **Both cases subsequently passed packaged CI**, linked above. After the cleanup-scope correction, this local command again passed cache-free and failed Redis on API readiness; the independent CLI stop log confirmed successful shutdown, while the shared terminal helper observed the prior ERR prompt. That local run is not claimed green. - Temporary fault-injection validation used that same E2E command with only the cache-free case and a shell wrapper returning HTTP 503 for the Dashboard probe after a real packaged AppHost launch - intentionally failed. Terminal output showed `dashboard-http-failed`, then cleanup invocation; the CLI log confirmed `apphost.go stopped successfully` and exit 0. The wrapper and temporary test edit were removed before the final clean build/commit. This verifies partial-start cleanup, not a successful readiness scenario. - `docker run --rm --entrypoint bash -v "${PWD}:/workspace:ro" aspire-go-e2e-6972:latest -c "sed 's/\r$//' /workspace/artifacts/readiness-ci/validate-stable-sdk-selection.sh | bash"` - passed actual smoke-script preflight cases for missing SDK, prerelease-only, mixed stable/dev/preview/rc/build-metadata/four-component filenames, multi-digit stable versions, and feed paths with spaces. The instrumented driver received `BundleVersion=17.0.0` from the mixed feed. Invalid-only feeds exited 1 with the explicit missing-stable diagnostic. Temporary harness removed after retaining logs; not a new all-language stabilization pass. - `dotnet test --project tests\Infrastructure.Tests\Infrastructure.Tests.csproj --no-launch-profile -- --filter-class '*.TestTriggerMapTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'` - passed, 176 tests. - `dotnet run --project tools\SelectTests -- --changed-files artifacts\readiness-changed-files.txt --explain` - passed against the real graph/map; Go hosting/codegen, Redis, starter checksum and EF Core fixture inputs select starter-validation/polyglot with zero unattributed files. Schedule-only deployment remains advisory. - `$env:DOTNET_ROOT = Join-Path $PWD '.dotnet'; $env:ASPIRE_REPO_ROOT = $PWD; .\artifacts\bin\Aspire.Cli\Debug\net11.0\aspire.exe restore --apphost tests\PolyglotAppHosts\<integration>\Go\apphost.go --non-interactive` - passed separately for `Aspire.Hosting.EntityFrameworkCore`, `Aspire.Hosting.Foundry`, and `Aspire.Hosting`, generating actual SDK bindings. - `docker run --rm --entrypoint bash -v "${PWD}:/workspace" aspire-go-e2e-6972:latest -c 'set -e; for fixture in Aspire.Hosting.EntityFrameworkCore Aspire.Hosting.Foundry Aspire.Hosting; do cd "/workspace/tests/PolyglotAppHosts/$fixture/Go"; gofmt -w apphost.go; go build -buildvcs=false -o /tmp/fixture ./...; go vet ./...; done'` - passed for all three fixtures. - `docker run --rm --entrypoint bash -v "${PWD}:/workspace:ro" aspire-go-e2e-6972:latest -c 'set -e; bash -n /workspace/.github/workflows/polyglot-validation/test-go.sh /workspace/.github/workflows/polyglot-validation/test-go-playground.sh /workspace/eng/scripts/stabilization-smoke-init-restore.sh; work=$(mktemp -d); trap "rm -rf $work" EXIT; cp /workspace/src/Aspire.Cli/Templating/Templates/go-starter/api/* "$work/"; cd "$work"; sed -i "s/{{projectNameLower}}/starter/g" go.mod; go build -mod=readonly -o /tmp/go-ready-api .; go mod tidy -diff; go vet ./...'` - passed without a dependency-repair command. - Native Linux `./restore.sh -p:SkipTestProjects=true -p:SkipPlaygroundProjects=true` - passed with the pinned SDK. - Native Linux `./dotnet.sh pack src/Aspire.Hosting.AppHost/Aspire.Hosting.AppHost.csproj -c Release -p:StabilizePackageVersion=true -p:SkipNativeBuild=true --nologo -v quiet` - failed as expected on existing NU5104 preview dependencies; not counted as a stabilization pass. - To isolate consumer behavior, the diagnostic feed used `for project in Aspire.Hosting Aspire.Hosting.AppHost Aspire.Hosting.Dotnet Aspire.TypeSystem Aspire.Hosting.CodeGeneration.Go Aspire.Hosting.CodeGeneration.Java Aspire.Hosting.Go Aspire.Hosting.Redis Aspire.Hosting.Java Aspire.Hosting.JavaScript Aspire.AppHost.Sdk Aspire.ProjectTemplates; do ./dotnet.sh pack "src/$project/$project.csproj" -c Release -p:StabilizePackageVersion=true -p:SkipNativeBuild=true -p:WarningsNotAsErrors=NU5104 --nologo -v quiet; done` - passed. No suppression is committed; Java remains `17.0.0-dev` by existing policy. - Native Linux `STABILIZATION_SMOKE_CONFIGURATION=Release ASPIRE_REPO_ROOT=/work/source bash eng/scripts/stabilization-smoke-init-restore.sh` - built the genuine stabilized Release driver/payload and completed the consumer flow. **Exit 1 is the expected Java policy failure, not an all-language pass.** Go/Redis `17.0.0` metadata names `/work/source/artifacts/packages/Release/Shipping`; C# `17.0.0` restored; Java reached real NuGet restore and rejected its absent stable pin with no nuget.org fallback. Output assertions confirmed the final failure list is exactly `java`. Sources were `1ab3ad1e30` plus the final smoke correction; no mixed PR-stamped CLI was used. - `bash -n eng/scripts/stabilization-smoke-init-restore.sh`, PowerShell parser validation of `eng\scripts\cli-starter-validation.ps1`, and `git diff --check` - passed. - Full `Infrastructure.Tests.TestTriggerMap` namespace was not passed on this Windows host: WSL's `bash.exe` cannot find `/bin/bash`; a narrowed run also encountered readonly `.git` cleanup failures. Not counted as successful validation. ## Checklist - Is this feature complete? - [ ] Yes. Ready to ship. - [x] 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 - 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: IEvangelist <7679720+IEvangelist@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 5138b2a)
…tions E2E (#21914) ## Description The Linux and Windows `tree-actions` VS Code E2E shard fails with `AssertionError: Expected e2e-worker to expose an endpoint URL.` in *routes view, copy, endpoint, log, and resource commands through tree handlers*. It is the most frequent flake since #21624. Examples: [run 41946839177 / job 126989027692](https://github.com/microsoft/aspire/actions/runs/41946839177/job/126989027692) (Linux), [run 41967348150 / job 127053704182](https://github.com/microsoft/aspire/actions/runs/41967348150/job/127053704182) (Windows, main), [run 41980257054 / job 127096573746](https://github.com/microsoft/aspire/actions/runs/41980257054/job/127096573746) (Windows). #21796 lists more. ## 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 | `Expected e2e-worker to expose an endpoint URL.` | | Job | VS Code extension E2E (Linux + Windows, tree-actions) | | main pushes: hits / runs | 8 / 306 (2.61%) | | main pushes, 30d: hits / runs | 8 / 530 (1.51%). The 16 days before the 14d window add 0 hits. | | PR runs: hits / runs | 28 / 1605 (1.74%); 0 PR-caused excluded | | Combined rate | 36 / 1911 = **1.88%** | | Flake check | main: next main run of the job passed 8/8; PR: 24/25 rerun hits passed on rerun (3 never rerun) | | First / last hit | 2026-11-05 / 2026-11-08 | | Still hitting main? | Yes, still active: last hit 2026-11-08; last main hit 2026-11-07 | | Fix evidence | Local real E2E: injected 5s delay 3/3 fail → 3/3 pass; natural run 1/1 pass. This PR's CI: tree-actions Linux and Windows passed 1/1 each. | Failing attempt-1 jobs, most recent first (10 of 34 log-verified hits): | Date (UTC) | Branch | Job | Signature excerpt | |---|---|---|---| | [2026-11-08 06:06](https://github.com/microsoft/aspire/actions/runs/42453400853/job/128650958075) | `aspireagent/vscode-bridge-scoped-fake-timers` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 05:17](https://github.com/microsoft/aspire/actions/runs/42450180289/job/128641295561) | `darc-main-252ee2c2-deac-4980-a34a-b797f49158de` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 04:40](https://github.com/microsoft/aspire/actions/runs/42447773687/job/128633232882) | `aspireagent/doctor-cancel-dcp-cleanup` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 04:32](https://github.com/microsoft/aspire/actions/runs/42447210418/job/128631545572) | `aspireagent/resource-attach-proof-resume-aborted-inspection` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-07 21:02](https://github.com/microsoft/aspire/actions/runs/42413947055/job/128538664400) | **main** | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-07 03:55](https://github.com/microsoft/aspire/actions/runs/42336149573/job/128297445902) | `sebros/resources-compact-view-regression-4abee4` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 23:20](https://github.com/microsoft/aspire/actions/runs/42311290959/job/128230943448) | **main** | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 22:50](https://github.com/microsoft/aspire/actions/runs/42307718588/job/128210216707) | `ellahathaway-stop-idle-extension-polling` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 20:25](https://github.com/microsoft/aspire/actions/runs/42288258477/job/128147538335) | **main** | VS Code extension E2E (Linux, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 20:20](https://github.com/microsoft/aspire/actions/runs/42287581178/job/128143472756) | `ellahathaway-clarify-agent-init-output` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | A strict re-scan of the job logs confirmed 34 of the 36 hits counted above; the table lists only confirmed hits. The rates above use the original count. **Verdict: STRONG.** The most frequent signature here: 36 hits since 2026-11-05 (8 on main), still hitting today. 24 of the 25 PR hits that were rerun passed on rerun, and all 8 main hits passed on the next main run. The real-E2E before/after repro shows the exact CI assertion. The PR's own CI is 1 run per OS. That is not statistical proof on its own: at a 1.9% rate, ~160 clean runs are needed for 95% confidence. <!-- /failure-stats --> **Why:** the spec captures `e2e-worker` from the first snapshot where it is `Running` and later reads its endpoint URL from that same object. DCP activates the worker's endpoint shortly after the resource reaches `Running`, and the backchannel omits inactive URLs, so the first `Running` snapshot can have `urls: []`. The URL-bearing snapshot arrives a few milliseconds later, but the spec never re-reads it. Since #21624, the worker reaches `Running` after the extension's `describe --follow` attaches, so this URL-less snapshot is now visible to the spec. **Fix:** wait with the existing `waitForRunningResourceWithUrl('e2e-worker', 'http:', 180000)` helper (already used by the Azure Functions spec) instead of `waitForResourceState('e2e-worker', ['Running'])`. This is a test-only change, and the endpoint assertion is unchanged. Fixes #21796 ## Confidence - **Real E2E, paired before/after (Linux, xvfb, real VS Code 1.130.0, CLI/DCP/VSIX/NuGets from main CI run 42413947055):** a local-only CLI wrapper delays the first URL-bearing `Running` `e2e-worker` line from `describe --follow` by 5s. The 5s delay is well above the 200ms state poll interval, so the URL-less snapshot is always observed. - Before (spec on `origin/main`): **3/3 failed** (6 passing, 1 failing), each with the exact CI assertion. - After (this PR): **3/3 passed** (7/7). - **Natural (no injection) run with the fix:** 1/1 passed (7/7). Locally, the URL-bearing `Running` snapshot followed the URL-less one by 2ms. - **Other checks:** eslint on the spec, `tsc` for both `tsconfig.e2e.json` and the unit project, and `e2eResourceReadiness.test.ts` (9/9, run with mocha directly) all pass. - **Not run locally:** the Windows `tree-actions` shard, other E2E shards, and `vscode-test`-hosted unit tests (the VS Code download host is blocked in my environment). CI covers these. **How we stop this recurring:** E2E specs that read resource URLs should wait on `waitForRunningResourceWithUrl` instead of a state-only `Running` gate, because state and URL activation arrive as separate snapshots. Related: #21854 made the same change but was closed without being merged. ## 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 (the change is to an E2E scenario test; the helper it uses already has unit coverage) - [ ] 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 37d2680)
…tions E2E (#21914) ## Description The Linux and Windows `tree-actions` VS Code E2E shard fails with `AssertionError: Expected e2e-worker to expose an endpoint URL.` in *routes view, copy, endpoint, log, and resource commands through tree handlers*. It is the most frequent flake since #21624. Examples: [run 41946839177 / job 126989027692](https://github.com/microsoft/aspire/actions/runs/41946839177/job/126989027692) (Linux), [run 41967348150 / job 127053704182](https://github.com/microsoft/aspire/actions/runs/41967348150/job/127053704182) (Windows, main), [run 41980257054 / job 127096573746](https://github.com/microsoft/aspire/actions/runs/41980257054/job/127096573746) (Windows). #21796 lists more. ## 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 | `Expected e2e-worker to expose an endpoint URL.` | | Job | VS Code extension E2E (Linux + Windows, tree-actions) | | main pushes: hits / runs | 8 / 306 (2.61%) | | main pushes, 30d: hits / runs | 8 / 530 (1.51%). The 16 days before the 14d window add 0 hits. | | PR runs: hits / runs | 28 / 1605 (1.74%); 0 PR-caused excluded | | Combined rate | 36 / 1911 = **1.88%** | | Flake check | main: next main run of the job passed 8/8; PR: 24/25 rerun hits passed on rerun (3 never rerun) | | First / last hit | 2026-11-05 / 2026-11-08 | | Still hitting main? | Yes, still active: last hit 2026-11-08; last main hit 2026-11-07 | | Fix evidence | Local real E2E: injected 5s delay 3/3 fail → 3/3 pass; natural run 1/1 pass. This PR's CI: tree-actions Linux and Windows passed 1/1 each. | Failing attempt-1 jobs, most recent first (10 of 34 log-verified hits): | Date (UTC) | Branch | Job | Signature excerpt | |---|---|---|---| | [2026-11-08 06:06](https://github.com/microsoft/aspire/actions/runs/42453400853/job/128650958075) | `aspireagent/vscode-bridge-scoped-fake-timers` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 05:17](https://github.com/microsoft/aspire/actions/runs/42450180289/job/128641295561) | `darc-main-252ee2c2-deac-4980-a34a-b797f49158de` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 04:40](https://github.com/microsoft/aspire/actions/runs/42447773687/job/128633232882) | `aspireagent/doctor-cancel-dcp-cleanup` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-08 04:32](https://github.com/microsoft/aspire/actions/runs/42447210418/job/128631545572) | `aspireagent/resource-attach-proof-resume-aborted-inspection` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-07 21:02](https://github.com/microsoft/aspire/actions/runs/42413947055/job/128538664400) | **main** | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-07 03:55](https://github.com/microsoft/aspire/actions/runs/42336149573/job/128297445902) | `sebros/resources-compact-view-regression-4abee4` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 23:20](https://github.com/microsoft/aspire/actions/runs/42311290959/job/128230943448) | **main** | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 22:50](https://github.com/microsoft/aspire/actions/runs/42307718588/job/128210216707) | `ellahathaway-stop-idle-extension-polling` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 20:25](https://github.com/microsoft/aspire/actions/runs/42288258477/job/128147538335) | **main** | VS Code extension E2E (Linux, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | | [2026-11-06 20:20](https://github.com/microsoft/aspire/actions/runs/42287581178/job/128143472756) | `ellahathaway-clarify-agent-init-output` | VS Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint URL.` | A strict re-scan of the job logs confirmed 34 of the 36 hits counted above; the table lists only confirmed hits. The rates above use the original count. **Verdict: STRONG.** The most frequent signature here: 36 hits since 2026-11-05 (8 on main), still hitting today. 24 of the 25 PR hits that were rerun passed on rerun, and all 8 main hits passed on the next main run. The real-E2E before/after repro shows the exact CI assertion. The PR's own CI is 1 run per OS. That is not statistical proof on its own: at a 1.9% rate, ~160 clean runs are needed for 95% confidence. <!-- /failure-stats --> **Why:** the spec captures `e2e-worker` from the first snapshot where it is `Running` and later reads its endpoint URL from that same object. DCP activates the worker's endpoint shortly after the resource reaches `Running`, and the backchannel omits inactive URLs, so the first `Running` snapshot can have `urls: []`. The URL-bearing snapshot arrives a few milliseconds later, but the spec never re-reads it. Since #21624, the worker reaches `Running` after the extension's `describe --follow` attaches, so this URL-less snapshot is now visible to the spec. **Fix:** wait with the existing `waitForRunningResourceWithUrl('e2e-worker', 'http:', 180000)` helper (already used by the Azure Functions spec) instead of `waitForResourceState('e2e-worker', ['Running'])`. This is a test-only change, and the endpoint assertion is unchanged. Fixes #21796 ## Confidence - **Real E2E, paired before/after (Linux, xvfb, real VS Code 1.130.0, CLI/DCP/VSIX/NuGets from main CI run 42413947055):** a local-only CLI wrapper delays the first URL-bearing `Running` `e2e-worker` line from `describe --follow` by 5s. The 5s delay is well above the 200ms state poll interval, so the URL-less snapshot is always observed. - Before (spec on `origin/main`): **3/3 failed** (6 passing, 1 failing), each with the exact CI assertion. - After (this PR): **3/3 passed** (7/7). - **Natural (no injection) run with the fix:** 1/1 passed (7/7). Locally, the URL-bearing `Running` snapshot followed the URL-less one by 2ms. - **Other checks:** eslint on the spec, `tsc` for both `tsconfig.e2e.json` and the unit project, and `e2eResourceReadiness.test.ts` (9/9, run with mocha directly) all pass. - **Not run locally:** the Windows `tree-actions` shard, other E2E shards, and `vscode-test`-hosted unit tests (the VS Code download host is blocked in my environment). CI covers these. **How we stop this recurring:** E2E specs that read resource URLs should wait on `waitForRunningResourceWithUrl` instead of a state-only `Running` gate, because state and URL activation arrive as separate snapshots. Related: #21854 made the same change but was closed without being merged. ## 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 (the change is to an E2E scenario test; the helper it uses already has unit coverage) - [ ] 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 37d2680)
Description
Fix a stale-snapshot race in the extension tree-action E2E scenario that blocked #21828. The test retained the first
e2e-workersnapshot with stateRunning, then later asserted that this same object contained an endpoint. Resource state and URL metadata can arrive in separate updates; later UI waits do not refresh an already-parsed snapshot.Use the existing
waitForRunningResourceWithUrl('e2e-worker', 'http:', 180000)before retaining the resource. Add two deterministic regressions forRunningwith null/empty URLs followed by HTTP metadata. Each contrasts the old Running-only gate with the URL-aware gate and proves the original snapshot stays stale. Document this E2E readiness requirement. No extension product behavior, fixture, lifecycle, CI configuration, dependency manifest, or test-selection routing changes.Relates to #21828.
Fixes # (issue)
Failure and controls
Expected e2e-worker to expose an endpoint URL.0a1a5d6807b91d1039474241ef6d273c861c0c7d(headbd30794b9e721e73f290b20d64414bf7580749cb, baseba43a210a8c6d202891f71d86dd100f54d60fa88). This is cross-platform evidence, not a same-platform reproduction.9c0619c6e9adefe54779cef09a4938e5fab04698and base4b5479b7ce6443a33c5a2746bd1bf7e92f29bc8d. It is not a same-source full-shard control. The endpoint assertion itself is unchanged; newer main added the seventh Go debugger setup scenario.Validation
Commands run from
extensionunless noted:corepack yarn compile-testscorepack yarn compile-e2ecorepack yarn unit-test --run out/test/e2eResourceReadiness.test.js --run out/test/e2eLaunchProfile.test.js --timeout 120000corepack yarn lintcorepack yarn compilegit diff --check(repository root)corepack yarn test:e2ewith tree-actions spec, VS Code 1.130.0, downloaded #21828 CLI and packages17.0.0-pr.21828.gbd30794bcorepack yarn test:e2ewith the same spec/CLI/VSIX and supported Windows VS Code 1.131.0Timed out after 120000ms waiting for workspace folder diagnostics.Remaining run canceled rather than waiting through more harness timeouts; the endpoint scenario was not reached.Neither local E2E attempt establishes a full-shard pass. The 1.131.0 environment alternative is not equivalent to CI's pinned VS Code run. CI validation of this branch remains pending, and independent approval is required before merge. Screenshots are not applicable: only test synchronization and contributor guidance change, with no UI change.
Checklist
<remarks />and<code />elements on your triple slash comments?