fix(embed): probe both loopback families in UI health check - #3530
Closed
NovaLux12 wants to merge 1 commit into
Closed
fix(embed): probe both loopback families in UI health check#3530NovaLux12 wants to merge 1 commit into
NovaLux12 wants to merge 1 commit into
Conversation
is_ui_running() health-checked a hardcoded 127.0.0.1 URL, so a Control Plane UI bound only to the IPv6 loopback (--hostname localhost, the vectorize-io#1926 workaround) was always reported as down: ui start timed out after 30s and ui status lied. Probe 127.0.0.1 then ::1, and bracket IPv6 literals in get_ui_url() so the probe URL is valid. Closes vectorize-io#3527
Contributor
Author
|
Duplicate of #3529 (opened 4 minutes earlier by @chethanuk) — closing mine to keep the issue to a single PR. Mine took a narrower approach (explicit 127.0.0.1 then [::1] probes with bracketed IPv6 URLs in is_ui_running, +98/-9 over 2 files, 162 embed tests passing); #3529 is broader (family-agnostic localhost probe, netstat parsing, _is_port_in_use). Happy to defer to #3529 or help consolidate if the maintainers prefer either variant. |
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.
Closes #3527
Problem
hindsight-embed ui start/ui statusreport the Control Plane UI as notrunning even when it is up:
is_ui_running()health-checks a hardcodedhttp://127.0.0.1:<port>/api/healthURL, but when the UI binds only the IPv6loopback (e.g. Next.js started with
--hostname localhost, the documented#1926 workaround) the probe is refused. Every command that depends on the
check —
ui start's ready-wait,ui status— reports failure, andui starttimes out after 30s while the UI is actually serving on
[::1].Change
DaemonEmbedManager.is_ui_running()now probes both loopback families,127.0.0.1then::1, returningTrueon the first healthy response.get_ui_url()brackets IPv6 literals (::1→[::1]) so the probe URL —and any display of an IPv6 hostname — is a valid URL.
Verification
hindsight-embed/tests/test_embed_manager.py:[::1]only is detected as running (asserts the exact probeURLs, including the bracketed IPv6 form);
False;get_ui_url("::1")→http://[::1]:<port>.uv run pytest tests/inhindsight-embed: 162 passed; the 3 failures(
test_profile_daemon_config.py) are pre-existing and environmental —they fail identically on a clean
maincheckout because the venv lackssentence_transformers, which flips_find_api_commandto theuvxfallback. Unrelated to this change.
ruff checkandruff format --checkpass on both changed files.