Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Add deadline to flyte grpc client #1069

Merged
merged 6 commits into from
Apr 17, 2023
Merged

Conversation

pablocasares
Copy link
Contributor

@pablocasares pablocasares commented Apr 14, 2023

Hey, I just made a Pull Request!

Description

Add a deadline for grpc flyte client calls.

Motivation and Context

This change is required to avoid Styx keeping broken connections for a long time generating a thread starvation problem.

Have you tested this? If so, how?

Checklist for PR author(s)

  • Changes are covered by unit test
  • All tests pass
  • Code coverage check passes
  • Error handling is tested
  • Errors are handled at the appropriate layer
  • Errors that cannot be handled where they occur are propagated
  • (optional) Changes are covered by system test
  • Relevant documentation updated
  • This PR has NO breaking change to public API
  • This PR has breaking change to public API and it is documented

Checklist for PR reviewer(s)

  • This PR has been incorporated in release note for the coming version
  • Risky changes introduced by this PR have been all considered


return new FlyteAdminClient(AdminServiceGrpc.newBlockingStub(channel));
return new FlyteAdminClient(
AdminServiceGrpc.newBlockingStub(channel).withDeadlineAfter(GRPC_CALL_DEADLINE_SECONDS, TimeUnit.SECONDS));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the Deadline has been added.

Copy link
Contributor

@sonjaer sonjaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, let me double check smth

@pablocasares pablocasares merged commit 241ccc8 into master Apr 17, 2023
@pablocasares pablocasares deleted the add-flyteadmin-grpc-deadline branch April 17, 2023 13:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants