Skip to content

Add model field to ElectricalComponent and Sensor messages#469

Merged
tiyash-basu-frequenz merged 2 commits intofrequenz-floss:v0.x.xfrom
tiyash-basu-frequenz:model_name
Apr 27, 2026
Merged

Add model field to ElectricalComponent and Sensor messages#469
tiyash-basu-frequenz merged 2 commits intofrequenz-floss:v0.x.xfrom
tiyash-basu-frequenz:model_name

Conversation

@tiyash-basu-frequenz
Copy link
Copy Markdown
Contributor

This PR adds a new field model to the ElectricalComponent and Sensor messages in the proto files. The model field includes both the manufacturer and the model name of the component or sensor.

Typically, the existing fields manufacturer and model_name are not used in separate contexts, despite being present in the structure for years. The new model field provides a more concise way to represent the model information, which is often used in practice.

In addition to the above, this PR deprecates the existing fields manufacturer and model_name, and these fields be removed in the next breaking change release.

@tiyash-basu-frequenz tiyash-basu-frequenz added this to the v0.8.3 milestone Apr 23, 2026
@tiyash-basu-frequenz tiyash-basu-frequenz self-assigned this Apr 23, 2026
@tiyash-basu-frequenz tiyash-basu-frequenz requested a review from a team as a code owner April 23, 2026 09:36
@tiyash-basu-frequenz tiyash-basu-frequenz requested review from cyiallou and removed request for a team April 23, 2026 09:36
@github-actions github-actions Bot added part:docs Affects the documentation part:protobuf Affects the protocol buffer definition files labels Apr 23, 2026
Copy link
Copy Markdown
Contributor

@llucax llucax 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 I would keep the field IDs sorted, otherwise I think things can get very error prone if one needs to manually grep the whole message to see what's the latest/highest ID when a new field needs to be added.

@llucax
Copy link
Copy Markdown
Contributor

llucax commented Apr 24, 2026

Hehe, that got officially confirmed, the current CI failure is actually because you got the ID wrong:

proto/frequenz/api/common/v1alpha8/microgrid/electrical_components/electrical_components.proto:666:57: Field number 10 has already been used in "frequenz.api.common.v1alpha8.microgrid.electrical_components.ElectricalComponent" by field "model".

@tiyash-basu-frequenz
Copy link
Copy Markdown
Contributor Author

LGTM, but I would keep the field IDs sorted, otherwise I think things can get very error prone if one needs to manually grep the whole message to see what's the latest/highest ID when a new field needs to be added.

True, not having them sorted is what caused the issue.

Comment thread proto/frequenz/api/common/v1alpha8/microgrid/sensors/sensors.proto
This commit adds a new field `model` to the `ElectricalComponent` and
`Sensor` messages in the proto files. The `model` field includes both
the manufacturer and the model name of the component or sensor.

Typically, the existing fields `manufacturer` and `model_name` are not
used in separate contexts, despite being present in the structure for
years. The new `model` field provides a more concise way to represent
the model information, which is often used in practice.

Signed-off-by: Tiyash Basu <tiyash.basu@frequenz.com>
This commit deprecates the existing `manufacturer` and `model_name`
fields in the `ElectricalComponent` and `Sensor` messages in favor of
the new `model` field that includes both the manufacturer and the model
name. This change is made to communicate to users that these fields
should no longer be used and to encourage users to switch to the new
`model` field.

Signed-off-by: Tiyash Basu <tiyash.basu@frequenz.com>
@tiyash-basu-frequenz tiyash-basu-frequenz added this pull request to the merge queue Apr 27, 2026
Merged via the queue into frequenz-floss:v0.x.x with commit 46c029c Apr 27, 2026
10 checks passed
@tiyash-basu-frequenz tiyash-basu-frequenz deleted the model_name branch April 27, 2026 11:21
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.

2 participants