Skip to content

Commit 020af2b

Browse files
committed
simplify FastForwardPollingResult
1 parent b776f10 commit 020af2b

4 files changed

Lines changed: 30 additions & 28 deletions

File tree

openapi/openapiv2.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15949,13 +15949,10 @@
1594915949
"FAST_FORWARD_POLLING_RESULT_UNSPECIFIED",
1595015950
"FAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT",
1595115951
"FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED",
15952-
"FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_ID_MISMATCH",
15953-
"FAST_FORWARD_POLLING_RESULT_EXECUTION_ENDED_BEFORE_FAST_FORWARD_COMPLETION",
15954-
"FAST_FORWARD_POLLING_RESULT_TIME_SKIPPING_DISABLED_BEFORE_FAST_FORWARD_COMPLETION",
15955-
"FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_RESET_BY_USER"
15952+
"FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED"
1595615953
],
1595715954
"default": "FAST_FORWARD_POLLING_RESULT_UNSPECIFIED",
15958-
"description": "FastForwardPollingResult is the result of polling and waiting for a fast-forward to complete\non a time-skipping execution.\nFAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT and FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED\nare the normal poll outcomes; the remaining values indicate potential improper usage of fast-forward on the client side.\n\n - FAST_FORWARD_POLLING_RESULT_UNSPECIFIED: Never returned; guards against an unset result.\n - FAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT: The poll timed out server-side before the fast-forward completed. The caller may poll again.\n - FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED: The fast-forward identified by the request's `fast_forward_id` reached its target time and completed.\n - FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_ID_MISMATCH: The request's `fast_forward_id` does not match the execution's current `fast_forward_id`.\n - FAST_FORWARD_POLLING_RESULT_EXECUTION_ENDED_BEFORE_FAST_FORWARD_COMPLETION: The request's `fast_forward_id` matched the execution's current `fast_forward_id`,\nbut the execution (the entire chain of runs) completed before the fast-forward\nhad a chance to complete.\n - FAST_FORWARD_POLLING_RESULT_TIME_SKIPPING_DISABLED_BEFORE_FAST_FORWARD_COMPLETION: The request's `fast_forward_id` matched the execution's current `fast_forward_id`,\nbut time skipping was disabled (e.g. `max_session_skip_count` was reached) before the\nfast-forward could complete.\n - FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_RESET_BY_USER: The user reset the fast-forward while the poll was in flight, i.e. updated the\nTimeSkippingConfig with a new FastForwardConfig reusing the same `fast_forward_id`.\nThe caller decides whether to poll again for the new fast-forward or treat this as a\nclient-side bug."
15955+
"description": "FastForwardPollingResult is the result of polling and waiting for a fast-forward to complete\non a time-skipping execution.\nFAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT and FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED\nare the normal poll outcomes; FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED means the\nfast-forward can no longer complete.\n\n - FAST_FORWARD_POLLING_RESULT_UNSPECIFIED: Never returned; guards against an unset result.\n - FAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT: The poll timed out server-side before the fast-forward completed. The caller may poll again.\n - FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED: The fast-forward identified by the request's `fast_forward_id` reached its target time and completed.\n - FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED: The fast-forward can no longer complete, which usually indicates improper usage of\nfast-forward on the client side. Possible reasons: the `fast_forward_id` does not match\nthe execution's current fast-forward, the execution ended before the fast-forward\ncompleted, the fast-forward config was updated while the poll was in flight, etc.\nSee `failed_reason` in the response for the specific cause."
1595915956
},
1596015957
"v1FetchWorkerConfigResponse": {
1596115958
"type": "object",
@@ -18103,8 +18100,13 @@
1810318100
"$ref": "#/definitions/v1FastForwardPollingResult",
1810418101
"description": "The outcome of the poll for the fast-forward identified by the request's `fast_forward_id`."
1810518102
},
18103+
"failedReason": {
18104+
"type": "string",
18105+
"description": "Set only when the result is FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED; explains why\nthe fast-forward can no longer complete."
18106+
},
1810618107
"fastForwardInfo": {
18107-
"$ref": "#/definitions/v1TimeSkippingFastForwardInfo"
18108+
"$ref": "#/definitions/v1TimeSkippingFastForwardInfo",
18109+
"description": "The execution's current fast-forward, if any."
1810818110
}
1810918111
}
1811018112
},

openapi/openapiv3.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14514,15 +14514,19 @@ components:
1451414514
- FAST_FORWARD_POLLING_RESULT_UNSPECIFIED
1451514515
- FAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT
1451614516
- FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED
14517-
- FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_ID_MISMATCH
14518-
- FAST_FORWARD_POLLING_RESULT_EXECUTION_ENDED_BEFORE_FAST_FORWARD_COMPLETION
14519-
- FAST_FORWARD_POLLING_RESULT_TIME_SKIPPING_DISABLED_BEFORE_FAST_FORWARD_COMPLETION
14520-
- FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_RESET_BY_USER
14517+
- FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED
1452114518
type: string
1452214519
description: The outcome of the poll for the fast-forward identified by the request's `fast_forward_id`.
1452314520
format: enum
14521+
failedReason:
14522+
type: string
14523+
description: |-
14524+
Set only when the result is FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED; explains why
14525+
the fast-forward can no longer complete.
1452414526
fastForwardInfo:
14525-
$ref: '#/components/schemas/TimeSkippingFastForwardInfo'
14527+
allOf:
14528+
- $ref: '#/components/schemas/TimeSkippingFastForwardInfo'
14529+
description: The execution's current fast-forward, if any.
1452614530
PollWorkflowTaskQueueResponse:
1452714531
type: object
1452814532
properties:

temporal/api/enums/v1/time_skipping.proto

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,19 @@ option csharp_namespace = "Temporalio.Api.Enums.V1";
1313
// FastForwardPollingResult is the result of polling and waiting for a fast-forward to complete
1414
// on a time-skipping execution.
1515
// FAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT and FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED
16-
// are the normal poll outcomes; the remaining values indicate potential improper usage of fast-forward on the client side.
16+
// are the normal poll outcomes; FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED means the
17+
// fast-forward can no longer complete.
1718
enum FastForwardPollingResult {
1819
// Never returned; guards against an unset result.
1920
FAST_FORWARD_POLLING_RESULT_UNSPECIFIED = 0;
2021
// The poll timed out server-side before the fast-forward completed. The caller may poll again.
2122
FAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT = 1;
2223
// The fast-forward identified by the request's `fast_forward_id` reached its target time and completed.
2324
FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED = 2;
24-
// The request's `fast_forward_id` does not match the execution's current `fast_forward_id`.
25-
FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_ID_MISMATCH = 3;
26-
// The request's `fast_forward_id` matched the execution's current `fast_forward_id`,
27-
// but the execution (the entire chain of runs) completed before the fast-forward
28-
// had a chance to complete.
29-
FAST_FORWARD_POLLING_RESULT_EXECUTION_ENDED_BEFORE_FAST_FORWARD_COMPLETION = 5;
30-
// The request's `fast_forward_id` matched the execution's current `fast_forward_id`,
31-
// but time skipping was disabled (e.g. `max_session_skip_count` was reached) before the
32-
// fast-forward could complete.
33-
FAST_FORWARD_POLLING_RESULT_TIME_SKIPPING_DISABLED_BEFORE_FAST_FORWARD_COMPLETION = 6;
34-
// The user reset the fast-forward while the poll was in flight, i.e. updated the
35-
// TimeSkippingConfig with a new FastForwardConfig reusing the same `fast_forward_id`.
36-
// The caller decides whether to poll again for the new fast-forward or treat this as a
37-
// client-side bug.
38-
FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_RESET_BY_USER = 7;
25+
// The fast-forward can no longer complete, which usually indicates improper usage of
26+
// fast-forward on the client side. Possible reasons: the `fast_forward_id` does not match
27+
// the execution's current fast-forward, the execution ended before the fast-forward
28+
// completed, the fast-forward config was updated while the poll was in flight, etc.
29+
// See `failed_reason` in the response for the specific cause.
30+
FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED = 3;
3931
}

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3654,5 +3654,9 @@ message PollWorkflowExecutionTimeSkippingRequest {
36543654
message PollWorkflowExecutionTimeSkippingResponse {
36553655
// The outcome of the poll for the fast-forward identified by the request's `fast_forward_id`.
36563656
temporal.api.enums.v1.FastForwardPollingResult fast_forward_polling_result = 1;
3657-
temporal.api.common.v1.TimeSkippingFastForwardInfo fast_forward_info = 2;
3657+
// Set only when the result is FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED; explains why
3658+
// the fast-forward can no longer complete.
3659+
string failed_reason = 2;
3660+
// The execution's current fast-forward, if any.
3661+
temporal.api.common.v1.TimeSkippingFastForwardInfo fast_forward_info = 3;
36583662
}

0 commit comments

Comments
 (0)