-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
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
iwf-python-sdk/iwf/workflow_state_options.py
Lines 32 to 34 in 695e320
| proceed_to_execute_when_wait_until_retry_exhausted: Optional[ | |
| WaitUntilApiFailurePolicy | |
| ] = None |
but in the code it is treated as boolean:
iwf-python-sdk/iwf/workflow_state_options.py
Lines 112 to 119 in 695e320
| 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
Labels
No labels