Skip to content

Commit 990b2ac

Browse files
authored
Make category/type update backwards compatible. (#224)
2 parents dbeea12 + 0e915b5 commit 990b2ac

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

RELEASE_NOTES.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
## Summary
44

5-
<!-- Here goes a general summary of what this release is about -->
5+
This update introduces the possibility to target specific types of batteries, inverters and EV chargers.
6+
7+
## Deprecations
8+
9+
* In the `TargetComponents` message, the field `components.component_categories` is now deprecated. See the upgrading section for details.
610

711
## Upgrading
812

9-
* The `TargetComponents` message now accepts an optional `type` too. `.components.component_categories` is no longer just a `ComponentCategory` but a new `CategoryAndType` message that has a required `category` (`ComponentCategory`) and an optional `type` (`oneof BatteryType, EVChargerType, InverterType`).
13+
* The `TargetComponents` message now accepts an optional `type` too. `.components.component_categories` is now deprecated. Instead `.components.component_categories_types`, a new `CategoryAndType` message that has a required `category` (`ComponentCategory`) and an optional `type` (`oneof BatteryType, EVChargerType, InverterType`) should be used.
1014

1115
## New Features
1216

proto/frequenz/api/dispatch/v1/dispatch.proto

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,13 @@ message TargetComponents {
336336
repeated uint64 ids = 1;
337337
}
338338

339+
340+
// Deprecated: Use `CategoryTypeSet` instead
341+
message CategorySet {
342+
// Set of component categories
343+
repeated frequenz.api.common.v1.microgrid.components.ComponentCategory categories = 1;
344+
}
345+
339346
// Wrapper for controlling dispatches with a set of component categories and optional types
340347
// Required as we can't use `repeated` directly in a `oneof`
341348
message CategoryTypeSet {
@@ -370,8 +377,13 @@ message TargetComponents {
370377
// Set of component IDs
371378
IdSet component_ids = 1;
372379

373-
// Component categories
374-
CategoryTypeSet component_categories = 2;
380+
// Deprecated: Component categories
381+
// Use `CategoryTypeSet` instead
382+
// In future versions, this field will be removed.
383+
CategorySet component_categories = 2;
384+
385+
// Component categories with optional types
386+
CategoryTypeSet component_categories_types = 3;
375387
}
376388
}
377389

0 commit comments

Comments
 (0)