fix(examples): stop launchers when gateway readiness fails - #625
Open
Bluu (Bluuok) wants to merge 2 commits into
Open
Bluu (Bluuok) wants to merge 2 commits into
Bluu (Bluuok) wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The multimodal QA launcher retains the same readiness bug and is omitted from regression coverage.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds bounded gateway readiness checks so example launchers fail before starting controllers or trainers.
Changes:
- Adds one-second curl timeouts and explicit readiness gates.
- Adds parameterized regression tests for six launchers.
- Leaves the equivalent multimodal QA launcher unchanged.
| File | Description |
|---|---|
examples/calc_x/run_local.sh |
Gates local startup on gateway readiness. |
examples/calc_x/run_minikube.sh |
Gates Minikube startup on gateway readiness. |
examples/gsm8k/run_local.sh |
Adds bounded readiness failure handling. |
examples/science_world/run_local.sh |
Prevents startup after failed probes. |
examples/search_r1/run.sh |
Prevents startup after failed probes. |
examples/llm-in-sandbox/run.sh |
Adds bounded readiness failure handling. |
tests/examples/test_launcher_readiness.py |
Tests failure, delayed success, and argument forwarding. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+26
to
+33
| LAUNCHERS = [ | ||
| Launcher("examples/calc_x/run_local.sh", "examples/calc_x"), | ||
| Launcher("examples/calc_x/run_minikube.sh", "examples/calc_x"), | ||
| Launcher("examples/gsm8k/run_local.sh", "examples/gsm8k"), | ||
| Launcher("examples/science_world/run_local.sh", "."), | ||
| Launcher("examples/search_r1/run.sh", "."), | ||
| Launcher("examples/llm-in-sandbox/run.sh", "."), | ||
| ] |
This branch has not been deployed
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.

Seven example launchers continue to start controllers/trainers after all 60 gateway health probes fail, and each curl request can wait indefinitely. This hides the startup failure and can launch training against an unavailable gateway.
Give each probe a one-second timeout, track readiness explicitly, and exit with a diagnostic before launching the controller/trainer when the retry loop is exhausted. Cover Calc-X local/Minikube, GSM8K, multimodal QA, ScienceWorld, Search-R1 and LLM-in-Sandbox in one focused change.
Validation in the frozen Linux CPU environment:
All 15 readiness tests passed: seven failure paths, seven delayed-success paths with intact arguments containing spaces, and one first-attempt success. The original six failure regressions failed on unchanged main; both added multimodal cases exposed missing gating/timeout in the previous branch version. Scoped Pyright and Bash syntax checks on repository-LF content passed. Earlier complete example-directory coverage passed 45 CPU tests before the multimodal addition; final combined verification is tracked separately.
The tests isolate all service, Ray, Minikube, cleanup, HTTP and training commands through a fake PATH. No real services, process termination, cluster, network or GPU training was exercised. Fork CI awaits maintainer approval. AI assistance was used; all seven launcher changes and regression coverage were reviewed.