Skip to content

Commit f8bd509

Browse files
Replace end_time field with duration
`end_time` can now be found in the recurrence rule instead. Fixes #71 Signed-off-by: Stefan Brus <[email protected]>
1 parent fd09dde commit f8bd509

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

RELEASE_NOTES.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
## Summary
44

5-
<!-- Here goes a general summary of what this release is about -->
5+
- End time has been moved to the recurrence rule object, replaced by `duration` on the base dispatch object.
66

77
## Upgrading
88

9-
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
9+
- Queries that compare against a time interval filter should check for the end time inside the recurrence rule.
1010

1111
## New Features
1212

13-
<!-- Here goes the main new features and examples or instructions on how to use them -->
13+
- Moved the field `end_time` to inside the recurrence rule object.
14+
- Introduced a new field `duration`.
1415

1516
## Bug Fixes
1617

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ message Dispatch {
9292
// The start time in UTC
9393
google.protobuf.Timestamp start_time = 6;
9494

95-
// The end time in UTC
96-
google.protobuf.Timestamp end_time = 7;
95+
// Duration in seconds
96+
uint32 duration = 7;
9797

9898
// The component selector
9999
ComponentSelector selector = 8;
@@ -129,10 +129,10 @@ message TimeIntervalFilter {
129129
// Filter by start_time < this timestamp
130130
google.protobuf.Timestamp start_to = 2;
131131

132-
// Filter by end_time >= this timestamp
132+
// Filter by recurrence.end_time >= this timestamp
133133
google.protobuf.Timestamp end_from = 3;
134134

135-
// Filter by end_time < this timestamp
135+
// Filter by recurrence.end_time < this timestamp
136136
google.protobuf.Timestamp end_to = 4;
137137
}
138138

@@ -247,6 +247,9 @@ message RecurrenceRule {
247247

248248
// On which month(s) of the year does the event occur
249249
repeated uint32 bymonths = 8;
250+
251+
// The end time in UTC
252+
google.protobuf.Timestamp end_time = 9;
250253
}
251254

252255
// Message for listing dispatches for a given microgrid, and an optional filter
@@ -297,8 +300,8 @@ message DispatchCreateRequest {
297300
// Timestamps earlier than the current time are not allowed.
298301
google.protobuf.Timestamp start_time = 3;
299302

300-
// The end time
301-
google.protobuf.Timestamp end_time = 4;
303+
// Duration in seconds
304+
uint32 duration = 4;
302305

303306
// The component selector
304307
ComponentSelector selector = 5;
@@ -327,8 +330,8 @@ message DispatchUpdateRequest {
327330
// Timestamps earlier than the current time are not allowed.
328331
google.protobuf.Timestamp start_time = 2;
329332

330-
// The end time
331-
google.protobuf.Timestamp end_time = 3;
333+
// Duration in seconds
334+
optional uint32 duration = 3;
332335

333336
// The component selector
334337
ComponentSelector selector = 4;

0 commit comments

Comments
 (0)