Skip to content

Conversation

@tiyash-basu-frequenz
Copy link
Contributor

closes #326

Copilot AI review requested due to automatic review settings May 20, 2025 16:08
@tiyash-basu-frequenz tiyash-basu-frequenz requested a review from a team as a code owner May 20, 2025 16:08
@tiyash-basu-frequenz tiyash-basu-frequenz self-assigned this May 20, 2025
@github-actions github-actions bot added part:docs Affects the documentation part:protobuf Affects the protocol buffer definition files labels May 20, 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

Adds a Snapshot suffix to state messages for sensors and electrical components to clarify that they represent sampled snapshots of state.

  • Renames SensorState to SensorStateSnapshot in sensors.proto
  • Renames ElectricalComponentState to ElectricalComponentStateSnapshot in electrical_components.proto
  • Updates RELEASE_NOTES.md to document both renames

Reviewed Changes

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

File Description
proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto Renamed message and should update its doc comment to reflect “Snapshot” terminology
proto/frequenz/api/common/v1/microgrid/electrical_components/electrical_components.proto Renamed message and should update its doc comment to reflect “Snapshot” terminology
RELEASE_NOTES.md Added entries for the two message renames
Comments suppressed due to low confidence (2)

proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto:170

  • [nitpick] Update this comment to clarify it represents a snapshot, e.g., // Representation of a sensor state snapshot and errors.
// Representation of a sensor state and errors.

proto/frequenz/api/common/v1/microgrid/electrical_components/electrical_components.proto:476

  • [nitpick] Update this comment to clarify it represents a snapshot, e.g., // Representation of a component state snapshot, warnings, and errors.
// Representation of a component state, warnings, and errors.

The state message in this case is a snapshot of the state of the
electrical component's composite sttae at a given time. The name
`ElectricalComponentStateSnapshot` is more descriptive and
accurately reflects the purpose of the message.

Signed-off-by: Tiyash Basu <[email protected]>

# Conflicts:
#	RELEASE_NOTES.md
The state message in this case is a snapshot of the sensor's composite
state at a given time. The name `SensorStateSnapshot` is more descriptive
and accurately reflects the purpose of the message.

Signed-off-by: Tiyash Basu <[email protected]>
message SensorState {
message SensorStateSnapshot {
// The time at which the state was sampled.
google.protobuf.Timestamp sampled_at = 1;
Copy link
Contributor

@tar-viturawong-frequenz tar-viturawong-frequenz May 20, 2025

Choose a reason for hiding this comment

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

The issue conversation wants origin_time/snapshot_time here (for SensorStateSnapshot).

message ElectricalComponentState {
message ElectricalComponentStateSnapshot {
// The time at which the state was sampled.
google.protobuf.Timestamp sampled_at = 1;
Copy link
Contributor

@tar-viturawong-frequenz tar-viturawong-frequenz May 20, 2025

Choose a reason for hiding this comment

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

The issue conversation wants origin_time/snapshot_time here (for ElectricalComponentStateSnapshot).

Copy link
Contributor

Choose a reason for hiding this comment

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

Exactly, I just also spotted that and reopened the issue.

Copy link
Contributor

@thomas-nicolai-frequenz thomas-nicolai-frequenz left a comment

Choose a reason for hiding this comment

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

LGTM

@tiyash-basu-frequenz tiyash-basu-frequenz added this pull request to the merge queue May 20, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit a11258d May 20, 2025
6 checks passed
@tiyash-basu-frequenz tiyash-basu-frequenz deleted the 326_snapshot branch May 20, 2025 17:17
@llucax
Copy link
Contributor

llucax commented May 21, 2025

Also nitpick, these are suffixes, not prefixes 😅

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.

Add a Snapshot suffix to SensorState and ElectricalComponentState

4 participants