Skip to content

FAIL_WORKFLOW_ON_FAILURE option not working #111

@cankoe

Description

@cankoe

Setting proceed_to_execute_when_wait_until_retry_exhausted in WorkflowStateOptions to WaitUntilApiFailurePolicy.FAIL_WORKFLOW_ON_FAILURE does not fail the workflow on state failure.

Expected behavior: Fail workflow on state failure

Suggested fix:

Attribute proceed_to_execute_when_wait_until_retry_exhausted is of type WaitUntilApiFailurePolicy

proceed_to_execute_when_wait_until_retry_exhausted: Optional[
WaitUntilApiFailurePolicy
] = None

but in the code it is treated as boolean:

if options.proceed_to_execute_when_wait_until_retry_exhausted:
res.wait_until_api_failure_policy = (
WaitUntilApiFailurePolicy.PROCEED_ON_FAILURE
)
else:
res.wait_until_api_failure_policy = (
WaitUntilApiFailurePolicy.FAIL_WORKFLOW_ON_FAILURE
)

which results in PROCEED_ON_FAILURE when it is set with either value.

Replace the conditional with

res.wait_until_api_failure_policy=options.proceed_to_execute_when_wait_until_retry_exhausted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions