Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add recovery policy and process state config #10

Merged
merged 13 commits into from
Oct 24, 2023
27 changes: 27 additions & 0 deletions api-schema/xdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,17 @@ components:
attempt:
description: for async state API only(during backoff retry)
type: integer
recoverFromStateExecutionId:
description: for async state API only, state id + sequence number
type: string
recoverFromApi:
description: if last execution failed, WAIT_UNTIL or EXECUTE, otherwise NONE
$ref: '#/components/schemas/StateApiType'
StateApiType:
type: string
enum:
- WAIT_UNTIL_API
- EXECUTE_API
WorkerErrorResponse:
type: object
required:
Expand Down Expand Up @@ -499,6 +510,22 @@ components:
$ref: '#/components/schemas/RetryPolicy'
executeApiRetryPolicy:
$ref: '#/components/schemas/RetryPolicy'
stateFailureRecoveryInfo:
Copy link
Contributor

@longquanzheng longquanzheng Oct 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it maybe nice to rename this to stateFailureRecoveryOptions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also let's create a separate definition for StateFailureRecoveryOptions and use $ref

type: object
required:
- policy
properties:
policy:
$ref: '#/components/schemas/StateFailureRecoveryPolicy'
stateFailureProceedStateId: # only valid when name is PROCEED_TO_CONFIGURED_STATE
type: string
stateFailureProceedStateConfig: # only valid when name is PROCEED_TO_CONFIGURED_STATE
$ref: '#/components/schemas/AsyncStateConfig'
StateFailureRecoveryPolicy:
type: string
enum:
- FAIL_PROCESS_ON_STATE_FAILURE
- PROCEED_TO_CONFIGURED_STATE
RetryPolicy:
type: object
properties:
Expand Down