Skip to content

Fix AppHost tree E2E row recycling race - #20400

Merged
Ella Hathaway (ellahathaway) merged 4 commits into
mainfrom
ellahathaway-apphost-flake-investigation
Sep 25, 2026
Merged

Ella Hathaway (ellahathaway) merged 4 commits into
mainfrom
ellahathaway-apphost-flake-investigation

Conversation

@ellahathaway

@ellahathaway Ella Hathaway (ellahathaway) commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #20335

ExTester can recycle a tree row between lookup and getLabel(), causing the AppHost discovery test to read Deploy AppHost instead of AspireE2E.AppHost.csproj.

Capture labels and parent/child relationships in one snapshot for read-only assertions, revalidate handle-based lookups, and add deterministic regression coverage. Production extension behavior is unchanged.

Validation

  • Full CI passed, including all 36 Windows/Linux apphost-tree and tree-actions tests without retries.
  • Deterministic tests reproduced the exact mismatch before the fix and passed afterward. TypeScript compilation, lint, and focused unit tests passed.

The natural race was not reproduced in two pre-fix Windows CI runs; post-fix Windows apphost-tree passed once.

Used the fix-flaky-test skill, adapted for ExTester.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • 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
    • 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
    • No

Temporary investigation for #20335. Preserve every existing WebDriver read, wait and assertion; keep normal CI enabled.

Co-authored-by: Copilot App <[email protected]>
@ellahathaway
Ella Hathaway (ellahathaway) changed the base branch from ellahathaway-apphost-tree-discovery to main September 23, 2026 20:24
Retargeting the investigation draft to main does not emit the synchronize event required by ci.yml. Preserve the diagnostics-only tree and start normal PR CI.

Co-authored-by: Copilot App <[email protected]>
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot September 23, 2026 20:26
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20400

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20400"

@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The PR is intentionally incomplete and must replace temporary diagnostics with a verified fix before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: None

What changed in this PR

Adds temporary E2E logging to investigate the Windows AppHost tree flake reported in #20335 without changing extension behavior.

Changes:

  • Logs the expected workspace AppHost label before lookup.
  • Logs successful completion of the existing label assertion.
File Description
extension/​src/​test-e2e/​appHostTree.e2e.test.ts Adds temporary baseline diagnostics around the flaky assertion.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Capture exact tree labels and parent-child paths in one browser snapshot, and revalidate handle-based lookups. Cover recycled rows, stale reads, hierarchy boundaries, and lifecycle errors.

Co-authored-by: Copilot App <[email protected]>
Retain the verified parent candidate exactly for official fix CI on the existing pull request.

Co-authored-by: Copilot App <[email protected]>
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot September 23, 2026 21:12
@ellahathaway Ella Hathaway (ellahathaway) changed the title [DO NOT MERGE] Investigate Windows AppHost tree discovery flake Fix AppHost tree E2E row recycling race Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

0 / 99 PR test projects · 2 PR jobs, from 4 changed files.

Selected PR test projects (0 / 99)

none — no PR-gated .NET test projects run for this change.

Selected PR jobs (2)

extension-e2e, extension-unit


How these were chosen — grouped by what changed

Job reasons

Job Triggered by
extension-e2e extension/src/test-e2e/appHostTree.e2e.test.ts, extension/src/test-e2e/helpers/vscode.ts, extension/src/test/fixtures/e2e-notification-extester-stub.ts, extension/src/test/treeItemWait.test.ts
extension-unit extension/src/test-e2e/appHostTree.e2e.test.ts, extension/src/test-e2e/helpers/vscode.ts, extension/src/test/fixtures/e2e-notification-extester-stub.ts, extension/src/test/treeItemWait.test.ts

Selection computed for commit d54eca3.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The timing-sensitive fix is coherent and well tested, but its candidate CI run remains queued and the PR is intentionally still draft.

Review effort: Balanced
Findings: None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the tree-row recycling fix and focused regression coverage. No blocking issues found.

@ellahathaway
Ella Hathaway (ellahathaway) merged commit 13ccbf1 into main Sep 25, 2026
95 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 14.0 milestone Sep 25, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

Step 5 branch taken: docs_optional → test_only

Triggered signals: none (signal_count: 0, triggered_signals: [] in .pr-docs-check/signals.json).

Allowlist justification (test_only): All 5 changed files are non-production:

  • extension/src/test-e2e/appHostTree.e2e.test.ts (matches extension/src/test-e2e/**)
  • extension/src/test-e2e/helpers/vscode.ts (matches extension/src/test-e2e/**)
  • extension/src/test/fixtures/e2e-notification-extester-stub.ts (matches extension/src/test/**)
  • extension/src/test/treeItemWait.test.ts (added, matches extension/src/test/**)
  • extension/CONTRIBUTING.md (contributor-facing build/test doc, not a microsoft/aspire.dev user-facing surface)

No src/ production files, public API surface, CLI options/commands, dashboard pages, or configuration were touched. The PR body itself states: "Production extension behavior is unchanged." This is a flaky-test fix (ExTester tree-row recycling race) using the fix-flaky-test skill adapted for the VS Code extension's E2E harness — it changes test determinism only, with no effect on what an end user experiences or on any documented behavior.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

3 participants