-
Notifications
You must be signed in to change notification settings - Fork 14
Add Snapshot prefix to sensor and electrical component states
#341
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
Add Snapshot prefix to sensor and electrical component states
#341
Conversation
There was a problem hiding this 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
SensorStatetoSensorStateSnapshotinsensors.proto - Renames
ElectricalComponentStatetoElectricalComponentStateSnapshotinelectrical_components.proto - Updates
RELEASE_NOTES.mdto 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]>
f66ed39 to
5c917b4
Compare
| message SensorState { | ||
| message SensorStateSnapshot { | ||
| // The time at which the state was sampled. | ||
| google.protobuf.Timestamp sampled_at = 1; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
thomas-nicolai-frequenz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Also nitpick, these are suffixes, not prefixes 😅 |
closes #326