Skip to content

[release/17.0] Make E2E notification cleanup deterministic - #22292

Merged
Jose Perez Rodriguez (joperezr) merged 1 commit into
release/17.0from
ci-health/release17-diagnostic-logs-windows
Nov 16, 2026
Merged

Jose Perez Rodriguez (joperezr) merged 1 commit into
release/17.0from
ci-health/release17-diagnostic-logs-windows

Conversation

@radical

@radical Ankit Jain (radical) commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Description

Backport of #21565 to release/17.0 (source commit af4527806f2e09424b40e72ab80895fffe82b02f).

The release branch's Windows diagnostic-log E2E scenario fails while clearing a notification: the toast's clear-button click at (11,11) is intercepted by the VS Code titlebar. This prevents the scenario from reliably exercising the current CLI and AppHost log actions.

This exact six-file backport uses the existing E2E control bridge to invoke VS Code's notifications.clearAll, rather than clicking the toast. Cleanup remains bounded; the feature assertions remain intact. Behavioral tests cover an unclickable toast and bridge command dispatch. No skips, quarantine, added retries, timeout increases, dependency changes, or workflow changes.

Related: #22241; original source issue #21742.

Failure evidence: release/17.0 push CI, attempt 1, Windows diagnostic-logs job, commit a509f094e0ee87d17dc0e1cc9bca84f7ca2623da. That source failure branch determines the PR base. The earlier backport #22009 is closed and unmerged; this PR does not modify or reopen it.

Customer Impact

Release-branch CI can fail during notification cleanup rather than testing diagnostic-log behavior. This is an E2E reliability fix, not a change to the shipped log actions or notification UI. Screenshots are not applicable to this test-control change.

Testing

The following results were obtained in a prior isolated Linux validation on the exact target commit above with this exact source patch; they are reused here, not presented as new executions:

Command (from extension/ unless noted) Result
corepack yarn run compile-tests Passed, including recompilation after restoring the fix.
corepack yarn exec mocha -- --ui tdd out/test/notificationWaitForMessage.test.js --grep 'dismisses notifications through VS Code clear-all' Expected failure with the original notifications[0].dismiss() restored and the new test retained: 0 passed, 1 failed with ElementNotInteractableError. This is a behavioral regression proof, not an actual Windows reproduction.
corepack yarn run compile-e2e Passed.
corepack yarn run compile-tests followed by corepack yarn exec mocha -- --ui tdd out/test/notificationWaitForMessage.test.js Passed: 9 tests with the fix restored. Recompilation is needed because the E2E compiler replaces shared output.
corepack yarn exec eslint -- src/test-e2e/helpers/vscode.ts src/test-e2e/edgeCases.e2e.test.ts src/test/e2eStateFileBridge.test.ts src/test/notificationWaitForMessage.test.ts src/testing/e2eStateFileBridge.ts src/types/extensionApi.ts Passed.
git diff --exit-code && git diff --cached --check (repository root) Passed; only the exact source patch was staged.

For this PR preparation, git cherry-pick --no-commit af4527806f2e09424b40e72ab80895fffe82b02f and git diff --cached --check passed again on the same target.

Current-head validation: CI run 43689787525 completed successfully at 58e2a9ea9fe792491c87dce7a723b389f3b816b7. Windows diagnostic-logs passed 2/2, edge-cases 6/6, tree-actions 7/7, and VS Code-hosted unit tests passed 4,153 with 9 pre-existing pending tests. The required Final Results check passes. Independent review of this exact head passed; there are no unresolved review threads.

Attempt 1 required workflow approval and ran no tests. Attempt 2 exposed existing release-branch tree URL readiness, global fake-timer, and ARM64 packaging failures; attempt 3 completed successfully. The earlier failures remain part of the CI record, not evidence of first-attempt reliability or branch recovery. Notification cleanup does not change resource URL snapshots; the timer tests use the pre-existing global fake clock. Separate fixes already on main address those tree/timer races and are not folded into this backport.

The existing test-selection map routes extension/** to extension unit and E2E jobs; no routing change is needed. The current release tip 6a7a7c49dc62640bc28cb6f9e613422540380206 has no extension/ changes relative to the tested base. Human review and shiproom approval remain required. A later eligible scheduled/push CI run exercising the merged fix is required before declaring branch recovery.

Risk

Low: the change is confined to E2E notification cleanup and its existing test-control bridge. It preserves bounded cleanup and the diagnostic-log assertions. Windows and hosted validation passed at the PR head.

Regression?

Unknown: the failure and matching main-branch fix are established, but the introducing version or commit is not.

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

🤖 AspireAssistant

Backport of #21565 (af45278). Preserve bounded cleanup and diagnostic-log assertions while using the VS Code clear-all command instead of an intercepted toast click.

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

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.

🔵 Needs a closer look

Windows E2E and VS Code-hosted bridge validation remain pending, leaving the backport’s ability to clear real notifications in the target host unverified.

No open issues 🎉

What changed in this PR

Backports #21565 to release/17.0 to make VS Code extension E2E notification cleanup independent of toast positioning and mouse interaction. The change targets test reliability without changing shipped diagnostic-log actions or notification UI.

Changes:

  • Adds an E2E bridge command that invokes VS Code’s notifications.clearAll.
  • Uses the command in bounded notification cleanup and the Python debugging setup scenario.
  • Adds regression coverage for unclickable notifications and bridge command dispatch.

Actual Windows E2E validation and the VS Code-hosted bridge test remain pending, as documented in the PR.

File Description
extension/​src/​types/​extensionApi.ts Adds the clear-all notification control command type.
extension/​src/​testing/​e2eStateFileBridge.ts Dispatches the new command to VS Code.
extension/​src/​test/​notificationWaitForMessage.test.ts Tests bridge-based cleanup with an unclickable toast.
extension/​src/​test/​e2eStateFileBridge.test.ts Tests dispatch to notifications.clearAll.
extension/​src/​test-e2e/​helpers/​vscode.ts Replaces toast clicking with bridge-based cleanup.
extension/​src/​test-e2e/​edgeCases.e2e.test.ts Uses shared cleanup after asserting the Python setup message.

Review effort: Balanced

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

Or

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

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

0 / 101 PR test projects · 2 PR jobs, from 6 changed files.

Selected PR test projects (0 / 101)

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/edgeCases.e2e.test.ts, extension/src/test-e2e/helpers/vscode.ts, extension/src/test/e2eStateFileBridge.test.ts, extension/src/test/notificationWaitForMessage.test.ts, extension/src/testing/e2eStateFileBridge.ts, extension/src/types/extensionApi.ts
extension-unit extension/src/test-e2e/edgeCases.e2e.test.ts, extension/src/test-e2e/helpers/vscode.ts, extension/src/test/e2eStateFileBridge.test.ts, extension/src/test/notificationWaitForMessage.test.ts, extension/src/testing/e2eStateFileBridge.ts, extension/src/types/extensionApi.ts

Selection computed for commit 58e2a9e.

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

@joperezr
Jose Perez Rodriguez (joperezr) merged commit 6e0984c into release/17.0 Nov 16, 2026
182 of 187 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants