Skip to content

Stabilize AppHost lifecycle and workspace terminal E2E tests - #19710

Merged
Adam Ratzman (adamint) merged 10 commits into
microsoft:mainfrom
adamint:adamint-harden-apphost-lifecycle-timeout
Aug 27, 2026
Merged

Adam Ratzman (adamint) merged 10 commits into
microsoft:mainfrom
adamint:adamint-harden-apphost-lifecycle-timeout

Conversation

@adamint

@adamint Adam Ratzman (adamint) commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

Description

The original PR only addressed the Windows apphost-lifecycle-tools failure. A broader review of the August 24-26 CI runs found four distinct VS Code extension E2E failures:

Failure Resolution
Windows edge-cases debugger guidance Fixed by #19702
Linux workspace-target-proof package hive Fixed by #19631
Windows apphost-lifecycle-tools PID/timeout race Fixed here
Linux workspace-target-proof dropped terminal command Fixed here

For apphost-lifecycle-tools, the synthetic CLI invocation now has ten seconds to start and the PID evidence wait has thirty seconds. The test still verifies that the descendant process is gone before runAspireCli rejects; product timeout and process-tree cleanup behavior are unchanged.

For workspace-target-proof, fallback terminal execution now waits for the terminal process to exist and rejects if the terminal closes or starts without a PID. The first command no longer sends Ctrl+C into a shell that may still be initializing, while reused terminals keep the existing Ctrl+C behavior. The reuse decision happens after startup so concurrent sends cannot both classify the terminal as fresh. The E2E also uses a separate folder C fixture for the direct Aspire: New Project path.

CodeLens log commands now return the terminal command promise, so startup failures flow through the existing command instrumentation instead of becoming unhandled rejections. Both startup errors are also registered in the extension localization catalog.

Local verification:

  • registerCodeLensCommands.test.ts: 1 passing
  • aspireTerminalProvider.test.ts: 89 passing
  • strings.test.ts: 13 passing
  • e2eLaunchProfile.test.ts: 72 passing
  • E2E TypeScript compilation and ESLint passed
  • The real VS Code 1.130.0 workspace-target-proof scenario passed

CI verification for head 08d7fad58:

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

This fix was created using the fix-flaky-test skill.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bfd8ca3a-fb74-4ea3-b300-2c08ff1713d7

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.

Pull request overview

Hardens a VS Code extension lifecycle E2E test against slow Windows process startup.

Changes:

  • Raises the synthetic CLI timeout to 10 seconds.
  • Extends PID evidence waiting to 30 seconds.
  • Keeps timeout assertions synchronized with the configured value.
Show a summary per file
File Description
extension/src/test-e2e/appHostLifecycleTools.e2e.test.ts Adjusts lifecycle timeout test timing.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread extension/src/test-e2e/appHostLifecycleTools.e2e.test.ts
@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 -- 19710

Or

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

@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 26, 2026
@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.

@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.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 63cccda9-cb23-490a-af18-eaea2384ee4c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 63cccda9-cb23-490a-af18-eaea2384ee4c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 63cccda9-cb23-490a-af18-eaea2384ee4c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 63cccda9-cb23-490a-af18-eaea2384ee4c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 63cccda9-cb23-490a-af18-eaea2384ee4c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 63cccda9-cb23-490a-af18-eaea2384ee4c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 63cccda9-cb23-490a-af18-eaea2384ee4c
Copilot AI review requested due to automatic review settings August 27, 2026 04:37

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.

Review details

Suppressed comments (1)

extension/src/utils/AspireTerminalProvider.ts:322

  • This startup failure is also surfaced by registerCliCommands.ts:169, making the literal user-facing. Define it with vscode.l10n.t(...) in src/loc/strings.ts and use the localized constant here.
                throw new Error('Aspire terminal process failed to start.');
  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread extension/src/utils/AspireTerminalProvider.ts
Comment thread extension/src/utils/AspireTerminalProvider.ts
Comment thread extension/src/utils/AspireTerminalProvider.ts Outdated
@adamint Adam Ratzman (adamint) changed the title Harden AppHost lifecycle timeout E2E test Stabilize AppHost lifecycle and workspace terminal E2E tests Aug 27, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 63cccda9-cb23-490a-af18-eaea2384ee4c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 63cccda9-cb23-490a-af18-eaea2384ee4c
Copilot AI review requested due to automatic review settings August 27, 2026 05:13

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.

Review details

  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@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.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ CI Failure Analysis: Possible Flaky Test(s)

The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests.

Suspected flaky test(s):

Suggested actions:

  • Re-run the failed CI jobs to confirm if the failure is intermittent
  • If the test continues to fail, consider quarantining it using /quarantine-test <test name> <issue URL>
  • Search existing issues to see if this test is already known to be flaky

You can re-run the failed jobs from the workflow run page.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants