Add server-side Dial retry for transient Available status#440
Open
ambient-code[bot] wants to merge 1 commit intomainfrom
Open
Add server-side Dial retry for transient Available status#440ambient-code[bot] wants to merge 1 commit intomainfrom
ambient-code[bot] wants to merge 1 commit intomainfrom
Conversation
When a client Dials immediately after lease acquisition, the exporter may still be in "Available" status (transitioning to LeaseReady). Old clients lack the client-side retry logic added in a previous fix, so they fail with FAILED_PRECONDITION. This adds a brief server-side retry loop (up to ~3s) in the controller's Dial handler for the transient Available status, protecting old clients without requiring upgrades. Fixes #309 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for jumpstarter-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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
Dialhandler when the exporter is inAvailablestatus (a transient state during lease setup)LeaseReadyAvailablestatus -- other error statuses (Offline, HookFailed) fail immediatelyContext
When a lease is acquired, there's a race window between the client receiving
Readyand the exporter completing its transition toLeaseReady. New clients handle this with client-side retry (already implemented inlease.py), but old clients fail withFAILED_PRECONDITION: "exporter is not ready (status: Available)".This server-side fix complements the existing client-side retry and ensures backward compatibility.
Fixes #309
Test plan
go test ./internal/service/...)🤖 Generated with Claude Code