SK-3023 add configurable connect/read/write timeouts (v3) - #374
Open
Devesh-Skyflow wants to merge 1 commit into
Open
SK-3023 add configurable connect/read/write timeouts (v3)#374Devesh-Skyflow wants to merge 1 commit into
Devesh-Skyflow wants to merge 1 commit into
Conversation
Extends the v3 HTTP config (Phase 2 of CUST-4311) with per-attempt connectTimeout, readTimeout, and writeTimeout, in seconds, at both the client-wide (Skyflow.builder()) and per-vault (VaultConfig) levels, with the same per-field precedence as the existing timeout/retry knobs. Unset phase timeouts leave OkHttp's built-in 10s default in place, so existing integrations are unchanged. The overall `timeout` (callTimeout) remains the total ceiling that bounds the whole call including retries; the three phase timeouts bound a single phase of one attempt. - VaultConfig: connectTimeout/readTimeout/writeTimeout fields + accessors - Skyflow.SkyflowClientBuilder: client-wide setters + propagation - VaultClient: resolve per-field and apply only when configured - Tests: OkHttp-default-when-unset, vault/client overrides, per-field - README: settings table + "how the four timeouts relate" guidance - TimeoutAndRetryConfigExample: show the three new timeouts in the sample Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Devesh-Skyflow
force-pushed
the
devesh/sk-3023-add-timeouts
branch
from
July 28, 2026 11:43
abdd215 to
4033a03
Compare
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.
What
Extends the v3 HTTP config (Phase 2 of CUST-4311) with per-attempt
connectTimeout,readTimeout, andwriteTimeout— in seconds, at both the client-wide (Skyflow.builder()) and per-vault (VaultConfig) levels — with the same per-field precedence as the existingtimeout/retry knobs.Phase 1 (
timeout+ retries) shipped earlier and explicitly deferred these three to "a future phase"; this is that phase. Purely additive, no generated-code edits, no Fern bump.How the four timeouts relate
timeout— the total ceiling for the whole call (every attempt + every backoff sleep). Default 60s.connectTimeout/readTimeout/writeTimeout— each bounds a single phase of one attempt. Default to OkHttp's built-in 10s.Because the phase timeouts are per attempt, their sum across retries can exceed
timeout, buttimeoutalways wins and cuts the call off.Changes
VaultConfig— threeInteger(seconds) fields + getters/setters.Skyflow.SkyflowClientBuilder— client-wideconnectTimeout(int)/readTimeout(int)/writeTimeout(int)setters + propagation.VaultClient— resolve each per-field (vault → client → unset) and apply to the sharedOkHttpClientonly when configured, so unset keeps OkHttp's 10s default.TimeoutLiveDemo— scenario demonstrating a per-phase timeout firing before the overall ceiling.Backward compatibility
All new fields are optional. Unset phase timeouts preserve OkHttp's 10s default — existing integrations compile and run unchanged.
Testing
16/16 HTTP-config unit tests pass (
-Djacoco.skip=true; JaCoCo can't instrument Java 21 here — pre-existing, unrelated).TimeoutLiveDemorun end-to-end: overalltimeout=5scuts at ~5.0s;readTimeout=2sunder a 30s overalltimeoutcuts at ~2.0s.🤖 Generated with Claude Code