Fail loudly when a UI dev server dies in breeze dev mode - #71784
Open
Andrushika wants to merge 2 commits into
Open
Fail loudly when a UI dev server dies in breeze dev mode#71784Andrushika wants to merge 2 commits into
Andrushika wants to merge 2 commits into
Conversation
Follow-up to apache#71241. The dev-mode hook discarded the Popen handles of the two Vite dev servers, so a server dying later (e.g. losing a port race) went unnoticed. Worse, on macOS the SIGCHLD from the dead child woke signal.pause(), so the script fell off its end and reported success - the supervisor itself silently disappeared, orphaning the surviving server and leaving the browser on a blank page with no error anywhere.
Andrushika
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496,
jscheffl and
potiuk
as code owners
August 18, 2026 17:42
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.
Why
Follow-up PR of #71241.
In the prek hook
compile-ui-assets-dev, the script starts the Vite dev server usingPopenthen drops the handles immediately, so a dev server that dies later is never detected.What's even worse: on macOS, the dead child's SIGCHLD wakes
signal.pause(), so the script exits 0 and reports success while the browser shows a blank page.What
Keep both
Popenhandles and poll them every second instead of callingsignal.pause().The pre-hook always starts two Vite dev servers. (port 5173 for UI, 5174 for Simple auth manager)
When any of them exits, the script prints which server died with its exit code and log file, stops the other one, and exits 1. Polling avoids SIGCHLD handling on purpose, since the platform-specific
pause()wakeup above is what made the old failure silent.related: #71241
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5) following the guidelines