Repository navigation
Bound transient Windows virtual environment removal retries - #2019
Closed
Stella Huang (StellaHuang95) wants to merge 2 commits into
Closed
Stella Huang (StellaHuang95) wants to merge 2 commits into
Stella Huang (StellaHuang95) wants to merge 2 commits into
Conversation
Contributor
|
🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR. |
Stella Huang (StellaHuang95)
enabled auto-merge (squash)
November 13, 2026 00:09
Stella Huang (StellaHuang95)
force-pushed
the
stellahuang-microsoft-ci-failure-analysis
branch
from
November 13, 2026 00:14
79cd066 to
254306f
Compare
Stella Huang (StellaHuang95)
disabled auto-merge
November 13, 2026 00:26
Contributor
|
Reviewed commit: Result: 🔴 Verification detailsVerification: Automated verification is best effort. The PR author remains responsible for testing. Summary: [unavailable] Container verification could not start and local execution was not authorized for this PR HEAD: Podman machine 'pyrx-automation' is not running. Test runs: none recorded. |
Rich Chiodo (rchiodo)
previously approved these changes
Nov 13, 2026
Rich Chiodo (rchiodo)
left a comment
Contributor
There was a problem hiding this comment.
Approved via Review Center.
Stella Huang (StellaHuang95)
force-pushed
the
stellahuang-microsoft-ci-failure-analysis
branch
from
November 13, 2026 00:59
254306f to
15ba12d
Compare
Rich Chiodo (rchiodo)
previously approved these changes
Nov 13, 2026
Create real environments in an owned temporary directory outside the open workspace, avoiding activation-script watcher refreshes during deletion. Compare discovered environments by their manager and normalized prefix. Preserve the actual API removal and discovery assertions; retry only owned fixture teardown. Restore production deletion behavior unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Retry only Windows EPERM/EBUSY failures around the entire deletion, with a short shared eligibility window and directory identity checks. Preserve the original removal primitive, confirmation, validation, untracking order, and workspace integration coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Stella Huang (StellaHuang95)
force-pushed
the
stellahuang-microsoft-ci-failure-analysis
branch
from
November 13, 2026 18:33
15ba12d to
92f0ac0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fs-extra.remove; retry onlyEPERM/EBUSYon Windows, around the entire deletion operation. Allow at most five attempts, with 100ms backoff and one monotonic 500ms retry-eligibility window. Do not enable native recursive per-entry retries.pyvenv.cfg.Behavior and limits
The window limits when another deletion attempt may start; it is not a hard 500ms timeout for filesystem I/O. A slow first attempt is not retried if it exhausts the window, and a slow successful deletion is still awaited. Fast persistent Windows sharing failures can take a few hundred milliseconds longer to report. The directory check prevents retrying an observed replacement, but does not make concurrent filesystem mutation atomic.
This avoids the earlier native-recursive retry policy whose waits multiplied across a directory tree. Controlled Windows checks with real Python virtual environments reproduced the failure mechanism: a temporary executable lock failed with the original helper (19ms) and succeeded with this helper (127ms); a persistent lock failed with both (6ms versus 442ms). A slower deeply nested locked executable received no additional retries (about 2.4s versus 2.1s). Replacement-directory and junction-target checks preserved unrelated files.
The original CI logs do not identify the filesystem error or lock-holding process, so this is a verified recovery for a reproduced mechanism, not a claim that a specific Python probe caused those CI failures. The original creation and interpreter-resolution operations are awaited before deletion.
Relates to #2012 and #2015.
Validation
npm run lint,npm run compile-tests, andnpm run unittest: latest full unit run passed with 3,580 passing and 9 pending tests.npm run compilepassed after the rebase; focused removal/orchestration tests passed with 36 passing and 2 platform-specific pending tests.--forbid-pending --fail-zeroand no Mocha retries.mainbefore pushing. The net diff contains onlyvenvUtils.tsand its removal unit tests; the workspace integration file matchesmain.521daed1and92f0ac0f. CI results for this pushed revision must be assessed separately; this PR has not been merged.