Skip to content

Commit ef67cbd

Browse files
authored
Add reset info to the activity heartbeat response (#578)
<!-- Describe what has changed in this PR --> **What changed?** Add two new flags to activity heartbeat response: * reset_requested // indicates that reset happen while activity is still running * reset_heartbeat //indicates that user asked to also reset heartbeats <!-- Tell your future self why have you made these changes --> **Why?** Product request. <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** No Corresponding Server PR: temporalio/temporal#7677
1 parent 709bd13 commit ef67cbd

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

openapi/openapiv2.json

+8
Original file line numberDiff line numberDiff line change
@@ -12203,6 +12203,10 @@
1220312203
"activityPaused": {
1220412204
"type": "boolean",
1220512205
"description": "Will be set to true if the activity is paused."
12206+
},
12207+
"activityReset": {
12208+
"type": "boolean",
12209+
"description": "Will be set to true if the activity was reset.\nApplies only to the current run."
1220612210
}
1220712211
}
1220812212
},
@@ -12216,6 +12220,10 @@
1221612220
"activityPaused": {
1221712221
"type": "boolean",
1221812222
"description": "Will be set to true if the activity is paused."
12223+
},
12224+
"activityReset": {
12225+
"type": "boolean",
12226+
"description": "Will be set to true if the activity was reset.\nApplies only to the current run."
1221912227
}
1222012228
}
1222112229
},

openapi/openapiv3.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -9254,6 +9254,11 @@ components:
92549254
activityPaused:
92559255
type: boolean
92569256
description: Will be set to true if the activity is paused.
9257+
activityReset:
9258+
type: boolean
9259+
description: |-
9260+
Will be set to true if the activity was reset.
9261+
Applies only to the current run.
92579262
RecordActivityTaskHeartbeatRequest:
92589263
type: object
92599264
properties:
@@ -9281,6 +9286,11 @@ components:
92819286
activityPaused:
92829287
type: boolean
92839288
description: Will be set to true if the activity is paused.
9289+
activityReset:
9290+
type: boolean
9291+
description: |-
9292+
Will be set to true if the activity was reset.
9293+
Applies only to the current run.
92849294
RegisterNamespaceRequest:
92859295
type: object
92869296
properties:

temporal/api/workflowservice/v1/request_response.proto

+15-7
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,10 @@ message RecordActivityTaskHeartbeatResponse {
529529

530530
// Will be set to true if the activity is paused.
531531
bool activity_paused = 2;
532+
533+
// Will be set to true if the activity was reset.
534+
// Applies only to the current run.
535+
bool activity_reset = 3;
532536
}
533537

534538
message RecordActivityTaskHeartbeatByIdRequest {
@@ -553,6 +557,10 @@ message RecordActivityTaskHeartbeatByIdResponse {
553557

554558
// Will be set to true if the activity is paused.
555559
bool activity_paused = 2;
560+
561+
// Will be set to true if the activity was reset.
562+
// Applies only to the current run.
563+
bool activity_reset = 3;
556564
}
557565

558566
message RespondActivityTaskCompletedRequest {
@@ -1840,13 +1848,13 @@ message UpdateActivityOptionsRequest {
18401848
// Controls which fields from `activity_options` will be applied
18411849
google.protobuf.FieldMask update_mask = 5;
18421850

1843-
// either activity id or activity type must be provided
1844-
oneof activity {
1845-
// Only activity with this ID will be updated.
1846-
string id = 6;
1847-
// Update all running activities of this type.
1848-
string type = 7;
1849-
}
1851+
// either activity id or activity type must be provided
1852+
oneof activity {
1853+
// Only activity with this ID will be updated.
1854+
string id = 6;
1855+
// Update all running activities of this type.
1856+
string type = 7;
1857+
}
18501858
}
18511859

18521860
message UpdateActivityOptionsResponse {

0 commit comments

Comments
 (0)