Skip to content

fix: bindCLIShortcuts to proper server#15162

Merged
bluwy merged 4 commits intomainfrom
fix/bind-cli-shortcuts-to-proper-server
Nov 29, 2023
Merged

fix: bindCLIShortcuts to proper server#15162
bluwy merged 4 commits intomainfrom
fix/bind-cli-shortcuts-to-proper-server

Conversation

@patak-cat
Copy link
Copy Markdown
Member

@patak-cat patak-cat 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-cat
Copy link
Copy Markdown
Member Author

patak-cat 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-cat patak-cat marked this pull request as draft November 27, 2023 15:06
@patak-cat patak-cat marked this pull request as ready for review November 27, 2023 15:38
@patak-cat
Copy link
Copy Markdown
Member Author

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

@patak-cat patak-cat added the p3-minor-bug An edge case that only affects very specific usage (priority) label Nov 27, 2023
Copy link
Copy Markdown
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
@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