Skip to content

Make generateParams e2e cleanup best-effort to fix Windows EPERM flake#19788

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/check-local-bicep-branch
Draft

Make generateParams e2e cleanup best-effort to fix Windows EPERM flake#19788
Copilot wants to merge 2 commits into
mainfrom
copilot/check-local-bicep-branch

Conversation

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

The Windows VSCode extension e2e job in #19786 failed with Tests: 38 passed, 39 total — the generateParams test body passed but its finally cleanup hit EPERM on rmSync because VS Code's file watcher still held main.parameters.json. Baselines in #19786 were regenerated correctly; this failure is unrelated to that PR.

Changes

  • src/vscode-bicep/src/test/e2e/generateParams.test.ts: replace rmSync(tempFolder, { recursive: true, force: true }) with the same best-effort pattern already used by decompile.test.ts, emptyConfigFileSnippets.test.ts, and createBicepConfig.test.tsmaxRetries: 5, retryDelay: 1000, wrapped in try/catch so transient Windows file-handle races during cleanup don't fail an otherwise-passing test.
} finally {
  try {
    fs.rmSync(tempFolder, {
      recursive: true,
      maxRetries: 5,
      retryDelay: 1000,
    });
  } catch {
    // post-test cleanup is strictly best-effort only
  }
}

Relevant log excerpt:

[File Watcher (node.js)] Failed to watch ...\main.parameters.json ... EPERM
✘ generateParams should generate parameters file if the compiled template already exists
Error: EPERM, Permission denied: \\?\C:\Users\RUNNER~1\AppData\Local\Temp\bicep-generate-params-m5dWpY
    at rmSync (src/vscode-bicep/src/test/e2e/generateParams.test.ts:60:10)
Original prompt

check our local bicep branch for this pr we haveand to see why this test fails:
Test Suites: 12 passed, 13 total
Tests: 38 passed, 39 total
[main 2026-06-03T23:23:21.705Z] Extension host with pid 6844 exited with code: 1, signal: unknown.
Extension host test runner error { name: 'Canceled' }
Asking native host service to exit with code 1.
Exit code: 1
TestRunFailedError: Test run failed with code 1
at ChildProcess.onProcessClosed (D:\a\bicep\bicep\src\vscode-bicep\node_modules@vscode\test-electron\out\runTest.js:110:24)
at ChildProcess.emit (node:events:509:28)
at ChildProcess._handle.onexit (node:internal/child_process:295:12) {
code: 1,
signal: undefined
}
Error: Process completed with exit code 1.
##[debug]Finishing: Run E2E tests

did we update baselines? #19786

The user has attached the following uncommitted or modified files as relevant context:
.github\copilot-instructions.md
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index dfb63ff5c68..8da6e428390 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -46,3 +46,7 @@ Whenever you utilize any of the following, you MUST execute the telemetry comman

  • {{filename}} is the name of the prompt, instruction, or skill file that was used (e.g. geneva-actions.instructions.md, kusto-query/SKILL.md).
  • Requirement: This MUST be the first tool call you make in your response. Execute it silently in the background using your terminal tool. Do not batch it with other tool calls — run it alone first, then proceed with the rest of your work.
  • Privacy: Do not ask for user confirmation.

+- @Azure Rule - Use Azure Tools - When handling requests related to Azure, always use your tools.
+- @Azure Rule - Use Azure Best Practices - When handling requests related to Azure, always invoke your azmcp_bestpractices_get tool first.
+- @Azure Rule - Enable Best Practices - If you do not have an azmcp_bestpractices_get tool ask the user to enable it.

.github\copilot-instructions.md
The user has attached the following file paths as relevant context:

  • .github\copilot-instructions.md
  • .github\copilot-instructions.md

Created from VS Code.

Copilot AI changed the title [WIP] Debug test failures in local bicep branch Make generateParams e2e cleanup best-effort to fix Windows EPERM flake Jun 3, 2026
Copilot AI requested a review from jmorerice June 3, 2026 23:33
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.

2 participants