Add timeouts to all api calls#169
Merged
Marenz merged 1 commit intofrequenz-floss:v0.x.xfrom May 26, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces configurable timeouts for all gRPC API calls and streams in the DispatchApiClient.
- Added default timeout constants (
DEFAULT_GRPC_CALL_TIMEOUT,DEFAULT_GRPC_STREAM_TIMEOUT). - Extended
DispatchApiClient.__init__withcall_timeoutandstream_timeoutparameters. - Applied the timeouts to all stub method invocations.
- Updated release notes to document the new timeout behavior.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/frequenz/client/dispatch/_client.py | Defined default timeouts, added constructor parameters, and passed timeout to stubs. |
| RELEASE_NOTES.md | Documented default call and stream timeouts and parameter names for the client. |
Comments suppressed due to low confidence (2)
RELEASE_NOTES.md:15
- The parameter name in the release notes (
default_timeout) does not match the code (call_timeout). Update the notes to refer tocall_timeoutfor consistency.
* * `default_timeout: timedelta` (default: 60 seconds)
RELEASE_NOTES.md:16
- The release notes indicate a 5-minute default for
stream_timeout, but the constant is defined as 5 seconds in code. Ensure the documented default matches the implemented value.
* * `stream_timeout: timedelta` (default: 5 minutes)
llucax
reviewed
May 22, 2025
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
llucax
approved these changes
May 26, 2025
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.
No description provided.