fix(k8s-driver): use dedicated kube client without read_timeout for watches#907
Merged
TaylorMutch merged 1 commit intoNVIDIA:mainfrom Apr 21, 2026
Merged
Conversation
…atches The 30s read_timeout on the shared kube client was killing the long-lived watch streams during idle periods, causing a reconnect cycle every 30 seconds. Use a separate client with no read_timeout for watch_sandboxes so the streams stay open indefinitely.
9cf141e to
c819cf9
Compare
TaylorMutch
approved these changes
Apr 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.
Summary
The shared Kubernetes client's 30-second
read_timeoutwas terminating long-lived watch streams during idle periods, causing a reconnect cycle every 30 seconds. This creates a dedicatedwatch_clientwithread_timeout: Nonefor watch operations while preserving the timeout-protected client for CRUD operations.Avoids these warnings in the openshell-server log
Changes
watch_clientfield toKubernetesComputeDriverwithread_timeout: Nonewatch_api()helper that uses the watch clientwatch_sandboxesto use the watch client for both sandbox and event watchersTesting
mise run pre-commitpassescargo check -p openshell-driver-kubernetescompiles cleanChecklist