Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bindCLIShortcuts to proper server #15162

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

patak-dev
Copy link
Member

@patak-dev patak-dev commented Nov 27, 2023

Fixes #15159

Description

1ab9596 is the fix, we should use the server instance after the reinit process is done

b4d0cd4 scopes the newServer -> server logic to avoid newServer being used in the future after the reinit and close process is done.

Ref #14890


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@patak-dev
Copy link
Member Author

patak-dev commented Nov 27, 2023

Edit, there was an error introduced by extracting the helper at 5c7d4bc, when the restart failed the return was not longer preventing the rest of the function to execute. This may be related to the below issues. The PR no longer extracts the methods, it just scopes the newServer variable.

This may uncover a race condition: https://github.com/vitejs/vite/actions/runs/7006424666/job/19058242176#step:13:111, or maybe others remember seeing this test being flaky?

Attempt 2 also failed https://github.com/vitejs/vite/actions/runs/7006424666/job/19058714731?pr=15162

Attempt 3 worked, other platforms worked twice without a glitch.

@patak-dev patak-dev marked this pull request as draft November 27, 2023 15:06
@patak-dev patak-dev marked this pull request as ready for review November 27, 2023 15:38
@patak-dev
Copy link
Member Author

It isn't easy to add a test for this one, we are currently not testing shortcuts in CI AFAICS.

@patak-dev patak-dev added the p3-minor-bug An edge case that only affects very specific usage (priority) label Nov 27, 2023
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call with the scoping 👍

@bluwy bluwy merged commit 67ac572 into main Nov 29, 2023
16 checks passed
@bluwy bluwy deleted the fix/bind-cli-shortcuts-to-proper-server branch November 29, 2023 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stuck on multiple reload
2 participants