Fix Azure Functions E2E polling after reload - #19237
Adam Ratzman (adamint) merged 11 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f178928-33f0-44eb-8e52-83bcdf1af89f
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19237Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19237" |
There was a problem hiding this comment.
Pull request overview
Fixes Azure Functions extension E2E resource polling after workspace reload.
Changes:
- Reopens the Aspire view after loading the generated workspace.
- Adds regression coverage enforcing the required operation order.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
extension/src/test-e2e/azureFunctions.e2e.test.ts |
Reactivates visibility-driven polling after reload. |
extension/src/test/e2eLaunchProfile.test.ts |
Verifies the Aspire view reopens before AppHost launch. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Needs #19142 |
…athaway-investigate-vscode-functions-e2e-timeout
This comment has been minimized.
This comment has been minimized.
|
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>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.github/workflows/extension-e2e-tests.yml:430
- The
azure-functionsmatrix entry still hasallowFailure: true(line 270), sorun-e2e.jsconverts completed Mocha failures—including this polling regression—into a successful job. That leaves the shard non-blocking despite #19151 requiring the skip to be removed once fixed. Before merging, set this shard toallowFailure: falseso the regression test protects CI.
echo "ASPIRE_EXTENSION_E2E_DOTNET_RUNTIME_VSIX=$dotnet_runtime_vsix"
echo "ASPIRE_EXTENSION_E2E_CSHARP_VSIX=$csharp_vsix"
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Blocked on #19299 |
…ate-vscode-functions-e2e-timeout
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/extension-e2e-tests.yml:429
- The Azure Functions matrix still sets
advisoryIssueto #19151.run-e2e.jsreturns success for completed Mocha failures whenever that value is present, so the exact polling timeout this PR fixes would remain non-blocking and the shard cannot provide the stated final confirmation. Remove this advisory marker when re-enabling the fixed shard.
echo "ASPIRE_EXTENSION_E2E_DOTNET_RUNTIME_VSIX=$dotnet_runtime_vsix"
echo "ASPIRE_EXTENSION_E2E_CSHARP_VSIX=$csharp_vsix"
extension/scripts/run-e2e.js:786
- These new required variables make the documented local Azure Functions E2E command fail in
resolveRequiredVsixPath:extension/CONTRIBUTING.md:124-127still supplies only the Resource Groups and Functions VSIXes and says only those two extensions are installed. Update that command and prerequisite/version text with the .NET runtime and C# VSIX requirements.
path: resolveRequiredVsixPath('ASPIRE_EXTENSION_E2E_DOTNET_RUNTIME_VSIX'),
},
{
displayName: 'C#',
path: resolveRequiredVsixPath('ASPIRE_EXTENSION_E2E_CSHARP_VSIX'),
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
Suppressed comments (2)
extension/src/test-e2e/helpers/fixtures.ts:98
- A fresh state-file session only proves that the new extension host has activated; it does not guarantee that the reloaded workbench DOM is ready. The next
openAspireView()immediately drives the command palette, whose retries cover less than a second, so a slow Linux reload can still fail before the UI is usable. After observing the new session ID, wait forVSBrowser.instance.waitForWorkbench(...)before returning from this helper.
await waitForExtensionState(
file => file.extensionHostSessionId !== previousExtensionHostSessionId,
'extension host to reload with the E2E workspace open',
timeoutMs);
extension/src/test-e2e/azureFunctions.e2e.test.ts:33
- This comment attributes the transition to opening the workspace, but the immediately preceding operation is an explicit Developer window reload; the generated workspace was already open. Describe the reload instead so the synchronization reason remains accurate.
// Opening the generated workspace reloads the extension host and returns VS Code to Explorer.
This comment has been minimized.
This comment has been minimized.
2c43cfd to
9b28c89
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
Suppressed comments (1)
extension/src/test-e2e/azureFunctions.e2e.test.ts:34
- This comment attributes the extension-host restart to opening the generated workspace, but the workspace is already open and
reloadWorkspaceForE2E()now invokes Developer: Reload Window. Describe the explicit window reload so the regression trigger is accurate.
// Opening the generated workspace reloads the extension host and returns VS Code to Explorer.
// Reopen the Aspire view so its visibility-driven runtime state polling observes the AppHost.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
Suppressed comments (1)
extension/src/test-e2e/azureFunctions.e2e.test.ts:34
- This comment attributes the extension-host reload to opening the generated workspace, but the reload is performed explicitly by
reloadWorkspaceForE2E()above. Describing the wrong trigger obscures the regression this scenario is protecting; identify Developer: Reload Window as the action that returns VS Code to Explorer.
// Opening the generated workspace reloads the extension host and returns VS Code to Explorer.
// Reopen the Aspire view so its visibility-driven runtime state polling observes the AppHost.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2b4c4a39-0a82-4f11-abfc-a737ab3c3758
This comment has been minimized.
This comment has been minimized.
|
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: 2b4c4a39-0a82-4f11-abfc-a737ab3c3758
Tests selector (audit mode)The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement. 1 / 102 test projects · 2 jobs, from 9 changed files. Selected test projects (1 / 102)
Selected jobs (2)
How these were chosen — grouped by what changed📄 Job reasons
Selection computed for commit |
|
✅ No documentation update needed. Step 5 branch taken: Triggered signals (1): Changed-file justification: All 10 changed files are internal E2E test infrastructure for the VS Code extension test suite: |
Description
The Linux Azure Functions extension E2E shard timed out waiting for
e2e-functionseven though the AppHost and DCP resource had already reachedRunning.The E2E runner starts VS Code with the generated workspace open. The scenario now opens the Aspire view and drives VS Code's Developer: Reload Window command from the ExTester process, which survives the extension-host restart. Before reloading, it clears the last control payload so the fresh host cannot replay a stale command. It then waits for a new extension-host session, the reloaded workbench, and AppHost discovery before reopening the Aspire view.
This matters because
AppHostDataRepositoryintentionally activatesaspire psandaspire describepolling only while the Aspire view is visible or an AppHost file is open; after reload, VS Code returns to Explorer and polling otherwise remains inactive. The reload cannot be awaited through the extension-host control bridge because that host terminates before it can acknowledge its own reload.This change exercises the real reload path before reopening the Aspire view and adds focused source-order and reload-synchronization regression coverage. It does not increase the timeout or change production polling behavior.
Validation:
corepack yarn --silent compile-testscorepack yarn --silent compile-e2e.\node_modules\.bin\mocha.cmd out\test\e2eLaunchProfile.test.js --ui tdd --grep "reloads outside the extension host|reloads the generated Azure Functions workspace".\node_modules\.bin\mocha.cmd out\test\e2eLaunchProfile.test.js --ui tdd --grep "defaults to the newest VS Code with the legacy macOS executable path while the internal feed lacks newer ExTester|reloads outside the extension host|reloads the generated Azure Functions workspace"corepack yarn --silent lintFixes #19151
Checklist
<remarks />and<code />elements on your triple slash comments?