Skip to content

Try fix flaky tests - #328312

Merged
alexr00 merged 2 commits into
mainfrom
pw/328281-new-session-draft-provider-race
Jul 31, 2026
Merged

Try fix flaky tests#328312
alexr00 merged 2 commits into
mainfrom
pw/328281-new-session-draft-provider-race

Conversation

@pwang347

@pwang347 pwang347 commented Jul 30, 2026

Copy link
Copy Markdown
Member

pwang347 added 2 commits July 30, 2026 15:40
…ut a draft

`_createNewSession` installed its `onDidChangeSessionTypes` retry listener only
after awaiting `openNewSession`. When a provider started serving the folder
during that await (e.g. the local agent host finishing its handshake on a cold
start), the change fired into the gap and was lost, so the composer kept no
draft and the harness picker stayed hidden forever.

Watch for the change from before the await and replay it once the durable
listener is installed.

Fixes the dominant failure in #328281.
The smoke runner deletes `.build/logs/smoke-tests-electron` on startup, so each
iteration wipes the previous one and the published artifact only ever contains
the last of 20 runs. A failure in any earlier iteration is therefore
undiagnosable: no renderer/exthost/agenthost logs, screenshots or traces.

Move the log directory aside on a failing iteration so the next run cannot
reclaim the name. Only failing iterations are kept, so the artifact stays small.

Refs #328281.
Copilot AI review requested due to automatic review settings July 30, 2026 23:14

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

Improves flaky smoke-test diagnostics and closes a provider-registration race in the Agents window.

Changes:

  • Replays session-type changes missed during asynchronous session creation.
  • Preserves failed smoke-test logs across iterations on all platforms.
  • Retains original smoke-test exit statuses.
Show a summary per file
File Description
src/vs/sessions/contrib/chat/browser/newChatWidget.ts Handles provider changes during session creation.
build/azure-pipelines/win32/product-smoke-flaky-win32.yml Archives failed Windows iteration logs.
build/azure-pipelines/linux/product-smoke-flaky-linux.yml Archives failed Linux iteration logs.
build/azure-pipelines/darwin/product-smoke-flaky-darwin.yml Archives failed macOS iteration logs.

Review details

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

Comment thread build/azure-pipelines/win32/product-smoke-flaky-win32.yml
Comment thread build/azure-pipelines/linux/product-smoke-flaky-linux.yml
Comment thread build/azure-pipelines/darwin/product-smoke-flaky-darwin.yml
Comment thread src/vs/sessions/contrib/chat/browser/newChatWidget.ts
@alexr00
alexr00 marked this pull request as ready for review July 31, 2026 07:03
@alexr00
alexr00 enabled auto-merge (squash) July 31, 2026 07:03
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@lszomoru

Matched files:

  • build/azure-pipelines/darwin/product-smoke-flaky-darwin.yml
  • build/azure-pipelines/linux/product-smoke-flaky-linux.yml
  • build/azure-pipelines/win32/product-smoke-flaky-win32.yml

@alexr00 alexr00 closed this Jul 31, 2026
auto-merge was automatically disabled July 31, 2026 07:05

Pull request was closed

@alexr00 alexr00 reopened this Jul 31, 2026
@alexr00
alexr00 merged commit be52ea5 into main Jul 31, 2026
62 checks passed
@alexr00
alexr00 deleted the pw/328281-new-session-draft-provider-race branch July 31, 2026 07:25
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky Smoke Tests

3 participants