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

IWF-405: Rename failure handling API #67

Merged
merged 6 commits into from
Dec 11, 2024
Merged

IWF-405: Rename failure handling API #67

merged 6 commits into from
Dec 11, 2024

Conversation

longquanzheng
Copy link
Contributor

No description provided.

workflow_id, "", type_hint
)

def wait_for_workflow_completion(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is also a rename same as in Java SDK.. too lazy to open a ticket for that (🥹 )https://github.com/indeedeng/iwf-java-sdk/blob/main/src/main/java/io/iworkflow/core/Client.java#L339

"""
execute_failure_handling_state: Optional[type] = None
execute_failure_handling_state_when_retry_exhausted: Optional[type] = None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

NOTE: python uses a different pattern as we mentioned this morning. we have wrapped a higher level model on the workflow state.

@longquanzheng longquanzheng marked this pull request as ready for review December 10, 2024 21:03
@longquanzheng longquanzheng changed the title Rename failure handling API IWF-405: Rename failure handling API Dec 10, 2024
@@ -87,14 +114,25 @@ def _to_idl_state_options(
res.execute_api_retry_policy = options.execute_api_retry_policy
if options.execute_api_timeout_seconds is not None:
res.execute_api_timeout_seconds = options.execute_api_timeout_seconds
if options.execute_failure_handling_state is not None:
if options.execute_failure_handling_state_when_retry_exhausted is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make the naming more consistent like in the JavaSDK?

wait_until_api_failure_policy_when_retry_exhausted
execute_api_failure_policy_when_retry_exhausted

?

Copy link
Contributor Author

@longquanzheng longquanzheng Dec 10, 2024

Choose a reason for hiding this comment

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

yeah I am thinking on that too. We can't do exactly because python sdk is using a differetn model and Python don't use the same convention like Java.

Maybe:

  • proceed_to_state_when_execute_retry_exhausted : state_class
  • proceed_to_execute_when_wait_until_retry_exhausted: bool

Our java SDK is :

  • setProceedWhenExecuteRetryExhausted
  • setProceedWhenWaitUntilRetryExhausted

WDYT?

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 to me 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@longquanzheng longquanzheng merged commit 2a09401 into main Dec 11, 2024
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.

2 participants