Skip to content

Conversation

@tiyash-basu-frequenz
Copy link
Contributor

No description provided.

This is done to better reflect the purpose of the field, which is to
provide a vendor-specific diagnostic code for the error or the warning
that the sensor is reporting. The term "diagnostic" is more appropriate
than "error" in this context, as it encompasses both errors and
warnings.

Signed-off-by: Tiyash Basu <[email protected]>
Copilot AI review requested due to automatic review settings April 30, 2025 17:12
@tiyash-basu-frequenz tiyash-basu-frequenz requested a review from a team as a code owner April 30, 2025 17:12
@github-actions github-actions bot added the part:protobuf Affects the protocol buffer definition files label Apr 30, 2025
@tiyash-basu-frequenz tiyash-basu-frequenz changed the title Rename vendor error code Rename vendor error code and update documentation Apr 30, 2025
@tiyash-basu-frequenz tiyash-basu-frequenz marked this pull request as draft April 30, 2025 17:12
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 updates the field name for vendor provided error codes in both sensor and electrical component diagnostics for improved clarity.

  • Changed "vendor_error_code" to "vendor_diagnostic_code" in sensors.proto and electrical_components.proto.
  • Updated inline comments to clarify error state conditions, with additional notes added to electrical_components.proto regarding unique state members and error population.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto Renamed vendor error field and updated comments for clearer diagnostics in SensorDiagnostic messages.
proto/frequenz/api/common/v1/microgrid/electrical_components/electrical_components.proto Renamed vendor error field and revised state error documentation in ElectricalComponentState.

@tiyash-basu-frequenz tiyash-basu-frequenz added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Apr 30, 2025
Copy link

@florian-wagner-frequenz florian-wagner-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, although I am not sure of the impact that the name change might have on the API (how long did this field exist, is anyone using it already?)

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, but please check the comments by @florian-wagner-frequenz .

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 vendor error code field to vendor diagnostic code and updates the related documentation in the proto files to clarify that list fields are treated as sets (i.e., no duplicates) and to detail behavior when in an error state.

  • Renames "vendor_error_code" to "vendor_diagnostic_code" in both sensors.proto and electrical_components.proto.
  • Updates documentation comments for list fields (states, warnings, errors) to explicitly state uniqueness and error state behavior.

Reviewed Changes

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

File Description
proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto Renamed vendor error field and refined comments for list uniqueness and error warning handling.
proto/frequenz/api/common/v1/microgrid/electrical_components/electrical_components.proto Renamed vendor error field and updated comments to clarify uniqueness and error state details in component states.

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 marked this pull request as ready for review May 7, 2025 08:54
@tiyash-basu-frequenz tiyash-basu-frequenz added this pull request to the merge queue May 7, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 819304a May 7, 2025
6 checks passed
@tiyash-basu-frequenz tiyash-basu-frequenz deleted the rename_vendor_error_code branch May 7, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR part:protobuf Affects the protocol buffer definition files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants