Skip to content

Conversation

@cwasicki
Copy link
Contributor

Scalar fields do not have HasField check in proto3.

Scalar fields do not have HasField check in proto3.

Signed-off-by: cwasicki <126617870+cwasicki@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 18, 2025 00:53
@github-actions github-actions bot added the part:docs Affects the documentation label Dec 18, 2025
Copy link

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 fixes a bug in the AggregatedMetric.sample() method by removing an invalid HasField("value") check on a proto3 scalar field. In Protocol Buffers version 3, scalar fields (such as numeric types) do not support the HasField() method, which was causing failures when retrieving formula-aggregated metrics.

Key Changes:

  • Removed invalid HasField("value") check from the aggregated metric sample processing logic
  • Updated release notes to accurately describe the bug fix

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/frequenz/client/reporting/_types.py Removed invalid proto3 scalar field check (sample.sample.HasField("value")) while keeping the valid message field check (sample.HasField("sample"))
RELEASE_NOTES.md Updated bug fix description to clarify the issue was an invalid HasField check causing failures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cwasicki cwasicki enabled auto-merge December 18, 2025 12:36
@cwasicki cwasicki added this pull request to the merge queue Dec 18, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 387cea9 Dec 18, 2025
12 checks passed
@cwasicki cwasicki deleted the fix branch December 18, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants