fix(tunnel): warn before invalidating active quick tunnel URL#424
Merged
Conversation
`obol stack down` and `obol tunnel restart` both rotate the *.trycloudflare.com URL on quick tunnels. Previously users got no warning before the rotation, so buyers using the old URL would silently see 530 errors after an RC upgrade or restart cycle. Add `ConfirmQuickTunnelLoss` in internal/tunnel that prints the soon-to-be-stale URL and offers a confirmation prompt. Skips entirely for persistent DNS tunnels (URL is stable across these events) and when no active quick tunnel pod is captured. Non-interactive sessions print the warning but pass through the default (yes), preserving automation and CI behavior. Wired into `stack.Down` (pre-cluster-delete) and `tunnel.Restart` (pre-rollout-restart). Drive-by gofmt of unrelated indentation drift in `CreateStorefront`.
OisinKyne
approved these changes
May 5, 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.
Summary
obol stack downandobol tunnel restartboth rotate the*.trycloudflare.comURL on quick tunnels (cluster delete kills the cloudflared pod; rollout restart starts a fresh one). Until now there was no warning before the rotation, so anyone with a seller registered against the URL would silently 530 after an RC upgrade or restart cycle.Surfaced in the rc8 reviewer feedback (item #4):
Approach
ConfirmQuickTunnelLoss(cfg, u, currentURL, action)ininternal/tunnel. Skips whenloadTunnelStateshows a persistent DNS tunnel (URL is stable across cluster recreates) or when no active quick tunnel URL is captured. Otherwise warns and prompts.stack.Down()before the cluster-delete path, and intotunnel.Restart()before the rollout-restart.gofmtof unrelated indentation drift inCreateStorefrontthat the formatter caught while editing the same file.Behavior
Continue? [Y/n](Enter = yes)Sample output (interactive):
Test plan
go build ./...cleango test ./internal/tunnel/ ./internal/stack/passtunnel_lifecycle_test.go:TestConfirmQuickTunnelLoss_PersistentSkipsWarning— DNS state set, helper short-circuits to trueTestConfirmQuickTunnelLoss_EmptyURLSkips— no captured URL, helper short-circuits to trueTestConfirmQuickTunnelLoss_NonInteractivePassesThrough— warning printed, default-yes pass-throughobol stack up→obol sell http demo→obol stack downshows the warning with the active quick URLspark2; warning printed with active quick tunnel URLhttps://surrounded-lucia-gulf-rapids.trycloudflare.comobol tunnel restarton a quick tunnel shows the warningspark2; restart warned before rotating the active quick-tunnel URLobol tunnel login --hostname …followed byobol stack downshows no warning (persistent path)spark1;obol tunnel login --hostname pr424-20260505163420-spark1.humanresearch.aicompleted, and subsequentobol stack downcompleted without the quick-tunnel invalidation warningobol stack down < /dev/nulldoes not blockspark2; command completed and tore down the stack without hangingOut of scope
tunnel.Restart/SyncAgentBaseURL/SyncTunnelConfigMappath already updates/skill.mdand agent metadata to the new URL.