Skip to content

Commit 57de820

Browse files
Add state_size_bytes to ScheduleInfo, ScheduleListInfo (#780)
**What changed?** - Added `state_size_bytes` to scheduler structs **Why?** - Needed by metering validation pipelines, potentially useful to customers interested in storage costs - Same pattern as in SAA **Breaking changes** - New fields only
1 parent 6487d66 commit 57de820

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

openapi/openapiv2.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18499,6 +18499,11 @@
1849918499
"invalidScheduleError": {
1850018500
"type": "string",
1850118501
"description": "Deprecated."
18502+
},
18503+
"stateSizeBytes": {
18504+
"type": "string",
18505+
"format": "int64",
18506+
"description": "Size of the schedule's internal state (including payloads) in bytes."
1850218507
}
1850318508
}
1850418509
},
@@ -18552,6 +18557,11 @@
1855218557
"type": "string",
1855318558
"format": "date-time"
1855418559
}
18560+
},
18561+
"stateSizeBytes": {
18562+
"type": "string",
18563+
"format": "int64",
18564+
"description": "Size of the schedule's internal state (including payloads) in bytes."
1855518565
}
1855618566
},
1855718567
"description": "ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo\nthat's returned in ListSchedules."

openapi/openapiv3.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15483,6 +15483,9 @@ components:
1548315483
invalidScheduleError:
1548415484
type: string
1548515485
description: Deprecated.
15486+
stateSizeBytes:
15487+
type: string
15488+
description: Size of the schedule's internal state (including payloads) in bytes.
1548615489
ScheduleListEntry:
1548715490
type: object
1548815491
properties:
@@ -15526,6 +15529,9 @@ components:
1552615529
items:
1552715530
type: string
1552815531
format: date-time
15532+
stateSizeBytes:
15533+
type: string
15534+
description: Size of the schedule's internal state (including payloads) in bytes.
1552915535
description: |-
1553015536
ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo
1553115537
that's returned in ListSchedules.

temporal/api/schedule/v1/message.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ message ScheduleInfo {
349349

350350
// Deprecated.
351351
string invalid_schedule_error = 8 [deprecated = true];
352+
353+
// Size of the schedule's internal state (including payloads) in bytes.
354+
int64 state_size_bytes = 12;
352355
}
353356

354357
message Schedule {
@@ -377,6 +380,9 @@ message ScheduleListInfo {
377380
// From info (maybe fewer entries):
378381
repeated ScheduleActionResult recent_actions = 5;
379382
repeated google.protobuf.Timestamp future_action_times = 6;
383+
384+
// Size of the schedule's internal state (including payloads) in bytes.
385+
int64 state_size_bytes = 7;
380386
}
381387

382388
// ScheduleListEntry is returned by ListSchedules.

0 commit comments

Comments
 (0)