Repository navigation
Log stream errors on a single line - #291
Merged
Merged
Conversation
Marenz
previously approved these changes
Nov 13, 2026
llucax
reviewed
Nov 13, 2026
The string form of `AioRpcError` spans several lines, which splits each retry warning into multiple journal entries. Log each field with `!r` instead, so line breaks are escaped, and skip the debug string when it only repeats the code and details. Signed-off-by: cwasicki <126617870+cwasicki@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The log formatter and its tests differ from the documented status-and-optional-details format, so the implementation or PR description needs to be aligned.
1 open issue
What changed in this PR
This PR makes GrpcStreamBroadcaster error logs single-line so retry warnings are not split across journal entries.
Changes:
- Adds compact error formatting with escaped line breaks and omits redundant debug strings.
- Tests formatting edge cases and updates expected retry and failure logs.
- Documents the logging change in the release notes.
| File | Description |
|---|---|
tests/streaming/test_grpc_stream_broadcaster.py |
Adds formatter tests and updates expected log messages. |
src/frequenz/client/base/streaming.py |
Adds single-line gRPC error formatting for stream logs. |
RELEASE_NOTES.md |
Records the single-line logging fix. |
Review effort: Balanced
llucax
approved these changes
Nov 27, 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.

The string form of
AioRpcErrorspans several lines, which splits each retry warning into multiple journal entries. Log each field with!rinstead, so line breaks are escaped, and skip the debug string when it only repeats the code and details.