Skip to content

Conversation

@dlukiantsev
Copy link
Contributor

No description provided.

@dlukiantsev dlukiantsev requested a review from a team June 18, 2025 07:26
@dlukiantsev dlukiantsev self-assigned this Jun 18, 2025
if options.wait_until_api_retry_policy is not None:
res.wait_until_api_retry_policy = options.wait_until_api_retry_policy
if options.proceed_to_execute_when_wait_until_retry_exhausted is not None:
if options.proceed_to_execute_when_wait_until_retry_exhausted:
Copy link
Member

@samuel27m samuel27m Jun 18, 2025

Choose a reason for hiding this comment

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

I'm not sure if this is the correct fix here. In the Java SDKs, the property passed in this option is boolean. I believe we should instead change the specification to take a bool value, and then use it here.

I'll PM you with a couple links of some of our internal examples, so that you can see how it is currently working in the Java SDK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know why in the python sdk Long decided to use enum instead of boolean, but the result should be the same.

Let me explain why I am removing this code block. First, the correct behavior is already implemented in line 95, so this code block was unnecessarily reassigning the value again. In addition to that, this duplicate code block had a bug. It was using the enum as conditional which was always evaluating to true, so the else: was never reached.

Since line 95 already assigns this value correctly, the best approach is to delete this duplicate code block.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense 👍

@samuel27m samuel27m linked an issue Jun 18, 2025 that may be closed by this pull request
from iwf.workflow_state_options import WorkflowStateOptions


class InitState1(WorkflowState[str]):
Copy link
Contributor Author

@dlukiantsev dlukiantsev Jun 18, 2025

Choose a reason for hiding this comment

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

Added two workflows with a single state. One tests that upon waitUntil fails, it proceeds to execute() and completes the workflow. The other, tests that upon waitUntil fails, it fails the workflow (does not proceed to execute).


self.assertTrue(isinstance(result.wait_until_api_failure_policy, Unset))

def test_proceed_on_failure(self):
Copy link
Contributor Author

@dlukiantsev dlukiantsev Jun 18, 2025

Choose a reason for hiding this comment

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

Below are integration tests, actually testing the behavior with running workflow.

@dlukiantsev dlukiantsev merged commit 9a3b491 into main Jun 18, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FAIL_WORKFLOW_ON_FAILURE option not working

4 participants