Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python client: re-connect event-stream, when connection dropped #3588

Merged
merged 22 commits into from
May 21, 2024

Conversation

masipauskas
Copy link
Contributor

@masipauskas masipauskas commented May 14, 2024

  • With grpc stream response, in case of connection drops - instead of getting an error - we stop getting events. This PR sets connection in python client such, that client will transparently attempt to reconnect in case no messages were received in last 15 minutes (timeout is configurable).
  • Also now now queue and job_set_id - are both required parameters for cancel / reprioritize requests (in line to actual go API).

In future, we will:

  • Intent is to add heartbeat messages from Armada API at a later stage, which would allow us to use a tighter timeout in the future (currently, we indirectly depend on Utilisation event messages, sent every 5 minutes as a proxy for connection heartbeat).
  • Reduce redis dependency (for non-event stream use-cases)

@masipauskas masipauskas requested a review from d80tb7 May 14, 2024 16:20
@masipauskas masipauskas added the component/clients Armada Client changes (any language) label May 14, 2024
d80tb7
d80tb7 previously approved these changes May 17, 2024
@masipauskas masipauskas merged commit 8c7bab2 into master May 21, 2024
27 of 28 checks passed
@masipauskas masipauskas deleted the feat/martynasa/client-reconnect-on-connection-drop branch May 21, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/clients Armada Client changes (any language)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants