Repository navigation
fix(worker): clear error on a taken dashboard port; ordered setup output - #42
Merged
Merged
Conversation
Feedback from a second worker on the same 2x RTX 6000 host: - Console mode checks the dashboard port before starting. A taken port used to cancel the worker and exit after setup printed "ok" (and the readiness probe found the other worker's dashboard). It now exits 1 with a --port hint. The desktop window still opens the running dashboard. - stdout/stderr are line-buffered, so --setup output no longer interleaves with worker log lines in pipes, nohup, or journald. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #40, from verifying v0.3.10 on a 2x RTX 6000 vLLM host where a second worker ran next to the live one.
Problems
--setuphad already printedok.. The readiness probe also connected to the other worker's dashboard, so the log saidDashboard: http://localhost:7861for a server this process never started.--setupoutput: stdout is block-buffered when it is not a TTY (pipes, nohup, journald), sook.and the setup summary printed after the worker's log lines. That made it look as if the worker started before setup finished.Changes
cli.mainchecks the dashboard port before starting in console mode. If it's taken, it exits 1 withError: dashboard port 7861 is already in use … grid-inference-worker --port 7862.SO_REUSEADDRlike uvicorn (not on Windows), so a TIME_WAIT socket from a just-restarted service doesn't count as "in use".inference_worker/AGENTS.mdandtests/AGENTS.mdupdated.Verification
pytest tests/passes: 171 passed, 1 skipped, including 4 new tests (real bound socket, console exit with hint and nothing started, GUI still opens the existing dashboard, line buffering).node --test tests/onboarding-ui.test.mjspasses: 32/32.🤖 Generated with Claude Code