fix: don't print 'Tunnel ready' until proxy URL responds#3
Open
drewr wants to merge 1 commit into
Open
Conversation
verify_endpoints was written but never called, causing tunnel_ready to fire as soon as Kubernetes conditions flipped — before Envoy Gateway had finished propagating the xDS config and the tunnel was actually serving traffic. Fix: - Call verify_endpoints after hostname resolution, before emitting tunnel_ready / printing 'Tunnel ready:' - Probe the origin first (best-effort, bounded budget) to confirm the local service is up - Then poll the tunnel HTTPS URL on a fixed 10s interval until it returns a non-5xx response, printing a status line each attempt - Only then emit tunnel_ready Also simplifies verify_endpoints: removes the exponential-backoff inner loop in favour of the fixed 10s interval the user sees.
This was referenced Jun 21, 2026
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.
Important
This PR depends on #2 and should be merged after it.
Problem
Tunnel ready:was printed as soon as all Kubernetes conditions flipped (connector ready, proxy programmed, etc.), but before Envoy Gateway had finished propagating the xDS config. The tunnel URL would return HTTP 503 for some time after the message appeared, making it look broken to the user.verify_endpointswas written to handle exactly this but was never called — it had been left dead (visible in thedead_codecompiler warnings).Fix
main.rs: callverify_endpointsafter hostname resolution, before emittingtunnel_ready/ printingTunnel ready:; pass arender_verifycallback sotunnel_verifying/tunnel_verifiedJSON events still fire for the Go supervisorprogress.rs: simplifyverify_endpoints— replace exponential backoff (capped at 2s, periodic status every 10s) with a fixed 10s interval; print a status line on every attemptResulting output