Skip to content

Add timeouts to all api calls #169

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

Merged
merged 1 commit into from
May 26, 2025
Merged

Conversation

Marenz
Copy link
Contributor

@Marenz Marenz commented May 22, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings May 22, 2025 14:18
@Marenz Marenz requested review from a team as code owners May 22, 2025 14:18
@github-actions github-actions bot added part:docs Affects the documentation part:dispatcher labels May 22, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

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__ with call_timeout and stream_timeout parameters.
  • 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 to call_timeout for 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)

@github-actions github-actions bot added the part:test-utils Affects the test utilities label May 22, 2025
@Marenz Marenz requested a review from llucax May 26, 2025 09:47
@Marenz Marenz enabled auto-merge May 26, 2025 09:49
Signed-off-by: Mathias L. Baumann <[email protected]>
@Marenz Marenz added this pull request to the merge queue May 26, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 1954f92 May 26, 2025
5 checks passed
@Marenz Marenz deleted the timeoutpls branch May 26, 2025 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:dispatcher part:docs Affects the documentation part:test-utils Affects the test utilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants