Skip to content

Commit 486e456

Browse files
authored
bug: add timestamp to TriggerImmediatelyRequest (#606)
_**READ BEFORE MERGING:** All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted._ <!-- Describe what has changed in this PR --> **What changed?** adding a timestamp to `TriggerImmediatelyRequest` message <!-- Tell your future self why have you made these changes --> We can make the wft “more idempotent”: put the desired trigger time in the trigger immediately request itself, so it goes in the signal payload, so all wfts attempt to start the target with the same id. <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> [**Server PR**](temporalio/temporal#7968)
1 parent 0d2638e commit 486e456

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

openapi/openapiv2.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14748,6 +14748,11 @@
1474814748
"overlapPolicy": {
1474914749
"$ref": "#/definitions/v1ScheduleOverlapPolicy",
1475014750
"description": "If set, override overlap policy for this one request."
14751+
},
14752+
"scheduledTime": {
14753+
"type": "string",
14754+
"format": "date-time",
14755+
"description": "Timestamp used for the identity of the target workflow.\nIf not set the default value is the current time."
1475114756
}
1475214757
}
1475314758
},

openapi/openapiv3.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11907,6 +11907,12 @@ components:
1190711907
type: string
1190811908
description: If set, override overlap policy for this one request.
1190911909
format: enum
11910+
scheduledTime:
11911+
type: string
11912+
description: |-
11913+
Timestamp used for the identity of the target workflow.
11914+
If not set the default value is the current time.
11915+
format: date-time
1191011916
TriggerWorkflowRuleRequest:
1191111917
type: object
1191211918
properties:

temporal/api/schedule/v1/message.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ message ScheduleState {
278278
message TriggerImmediatelyRequest {
279279
// If set, override overlap policy for this one request.
280280
temporal.api.enums.v1.ScheduleOverlapPolicy overlap_policy = 1;
281+
282+
// Timestamp used for the identity of the target workflow.
283+
// If not set the default value is the current time.
284+
google.protobuf.Timestamp scheduled_time = 2;
281285
}
282286

283287
message BackfillRequest {

0 commit comments

Comments
 (0)