GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: deflake env_install_interrupt by killing reinstall on install dir creation by fengmk2 · Pull Request #2283 · voidzero-dev/vite-plus

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jul 31, 2026

Copy link
Copy Markdown
Member

A fixed 100ms kill can fire before vp creates the new install dir on slow
Windows runners, leaving no stale dir for check-stale-packages to find.
Poll for the new install dir and kill as soon as it appears; the package's
200ms postinstall keeps the install running well past that point.


Stack created with GitHub Stacks CLI • Give Feedback 💬

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jong-kyung reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@fengmk2
test: deflake env_install_interrupt by killing reinstall on install d…
bb90a02
…ir creation

A fixed 100ms kill can fire before vp creates the new install dir on slow
Windows runners, leaving no stale dir for check-stale-packages to find.
Poll for the new install dir and kill as soon as it appears; the package's
200ms postinstall keeps the install running well past that point.
@fengmk2

fengmk2 commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

fix in #2282

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@fengmk2

fengmk2 commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

Superseded by #2282, which stabilized this fixture. Closing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@fengmk2 fengmk2 closed this Jul 31, 2026
@fengmk2
fengmk2 deleted the fix/env-install-interrupt-flake branch August 2, 2026 13:28
@fengmk2 fengmk2 mentioned this pull request Aug 4, 2026
test(snapshots): kill the real vp process in env_install_interrupt #2316
Merged
fengmk2 added a commit that referenced this pull request Aug 4, 2026
@fengmk2
test(snapshots): kill the real vp process in env_install_interrupt (#…
815e8a8
…2316)

The Windows `env_install_interrupt` case kept flaking after #2283 and
#2299, in two modes: the check-stale step reported "interrupted stale
package removed" instead of "exists", and a 60s zero-output step
timeout.

Root cause: on Windows, `vp` on PATH is the trampoline in `VP_HOME/bin`,
which runs `current/bin/vp.exe` as a child and waits. The interrupt
driver's `child.pid` was the trampoline, so #2299 killed the wrong
process first. The real vp.exe was then torn down by `taskkill /T`,
which kills the tree in unspecified order; whenever the npm subtree died
before vp.exe, the still-alive vp treated the reinstall as failed and
removed the partial install dir the test asserts on. When child
enumeration returned nothing, only the trampoline died and the real vp
survived as an orphan, matching the zero-output mode. Unix never flaked
because `bin/vp` is a symlink, so the killed child is the installer.

Fix, all inside the fixture:

- Spawn `VP_HOME/current/bin/vp[.exe]` directly so `child.pid` is the
process that runs the install on every platform; killing it first now
prevents the cleanup reaction.
- Kill the postinstall subtree via a PID handshake: postinstall writes
its PID into the ready file (write-then-rename), so the driver needs no
PowerShell/CIM enumeration. The npm layers in between exit on their own
once the script dies, and with vp already dead nobody reacts.
- Add stage markers and a 45s watchdog so a future failure names the
stage that hung instead of showing a blank PTY screen.

Verified on macOS with `cargo test -p vite_cli_snapshots --
env_install_interrupt`; the Windows race itself can only be exercised by
this PR's Windows CLI snapshot leg.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@fengmk2
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.