Add grpc headers and deadline to unary/unary calls#3433
Merged
Conversation
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
pingsutw
approved these changes
May 18, 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.
Why are the changes needed?
FlyteRemote.wait()polls execution state by repeatedly callingsync_execution(). When one of the underlying unary gRPC calls blocks on a stale or unhealthy connection, the wait loop can appear to hang because the loop timeout cannot be evaluated until the RPC returns.The client also did not set gRPC keepalive options explicitly, so idle TCP connection drops through load balancers or NAT could leave the next RPC waiting on a connection that should have been detected as unhealthy.
What changes were proposed in this pull request?
RawSynchronousFlyteClientso the client can detect dead idle connections and reconnect.FlyteRemote.sync_execution()is running.DEADLINE_EXCEEDEDtoFlyteTimeoutand avoid retrying deadline-expired calls.sync_executiondeadline scoping.How was this patch tested?
Targeted unit tests:
Result:
14 passed.A broader local run of
tests/flytekit/unit/clients/test_auth_helper.pyhit unrelated macOS keyring failures in the existing PKCE/deviceflow tests, so only the changed auth-helper test was included in the targeted verification above.Setup process
No special setup beyond the existing flytekit development environment.
Screenshots
Not applicable.
Check all the applicable boxes
Related PRs
None.
Docs link
Not applicable.