Skip to content

Conversation

@tiyash-basu-frequenz
Copy link
Contributor

@tiyash-basu-frequenz tiyash-basu-frequenz commented May 22, 2025

This commit renames the source field in the MetricSample message to connection. This change is made to clarify the purpose of the field, as it specifically refers to the connection point from which the metric was obtained, rather than a generic source.

closes #260

Copilot AI review requested due to automatic review settings May 22, 2025 14:54
@tiyash-basu-frequenz tiyash-basu-frequenz requested a review from a team as a code owner May 22, 2025 14:54
@github-actions github-actions bot added part:docs Affects the documentation part:protobuf Affects the protocol buffer definition files labels May 22, 2025
Copy link
Contributor

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 renames the MetricSample.source field to MetricSample.connection to make it clear that it refers to the connection point for the metric.

  • Rename the source field in MetricSample to connection and update its documentation.
  • Update example snippets in sensor and electrical component protos to use connection instead of source.
  • Add a release note entry for this breaking change.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto Updated example comments: sourceconnection; added sensor-specific note.
proto/frequenz/api/common/v1/microgrid/electrical_components/electrical_components.proto Added connection entries in snapshot examples.
proto/frequenz/api/common/v1/metrics/metrics.proto Renamed source field to connection and rewrote its doc.
RELEASE_NOTES.md Added release note for renaming sourceconnection.
Comments suppressed due to low confidence (1)

proto/frequenz/api/common/v1/metrics/metrics.proto:246

  • Ensure you update or add serialization/deserialization tests for the renamed connection field, replacing references to source to verify metric samples are properly handled.
optional string connection = 5;

This commit renames the `source` field in the `MetricSample` message to
`connection`. This change is made to clarify the purpose of the field,
as it specifically refers to the connection point from which the metric
was obtained, rather than a generic source.

Signed-off-by: Tiyash Basu <[email protected]>
@tiyash-basu-frequenz tiyash-basu-frequenz added this pull request to the merge queue May 23, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 31f568c May 23, 2025
6 checks passed
@tiyash-basu-frequenz tiyash-basu-frequenz deleted the 260_source_connection branch May 23, 2025 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation part:protobuf Affects the protocol buffer definition files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename source in MetricSample to connection

2 participants