Skip to content

Fail loudly when a UI dev server dies in breeze dev mode - #71784

Open
Andrushika wants to merge 2 commits into
apache:mainfrom
Andrushika:issue-71241-follow-up-diff-docs
Open

Fail loudly when a UI dev server dies in breeze dev mode#71784
Andrushika wants to merge 2 commits into
apache:mainfrom
Andrushika:issue-71241-follow-up-diff-docs

Conversation

@Andrushika

Copy link
Copy Markdown
Contributor

Why

Follow-up PR of #71241.
In the prek hook compile-ui-assets-dev, the script starts the Vite dev server using Popenthen 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 Popen handles and poll them every second instead of calling signal.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?
  • Yes — Claude Code (Fable 5)

Generated-by: Claude Code (Fable 5) following the guidelines

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant