Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Using retry_policy without max_retry_interval fails with no helpful error #96

Copy link
Copy link
@andystaples

Description

@andystaples
Issue body actions

Calling context.call_activity with a retry policy that doesn't specify max_retry_interval prevents the retry behavior from working, causing the orchestration to fail after the first activity failure.
Example:

@bp.orchestration_trigger(context_name="context", orchestration="RetryActivityFunction")
def retry_activity_function(context: OrchestrationContext, _):
    retry_policy = RetryPolicy(
        first_retry_interval=timedelta(milliseconds=5000),
        max_number_of_attempts=3,
    )
    # raise_exception will throw on the first invocation, then succeed on the second
    yield context.call_activity('raise_exception', input=context.instance_id, retry_policy=retry_policy)
    return "Success"

Cause:
When the _OrchestrationExecutor runs process_event on the taskFailed event, it calls compute_next_delay on the task, which returns None because self._retry_policy.max_retry_interval is None. This shunts to the default "fail the orchestration" behavior without logging a reason why.

Not sure what the best solution is - should we have a default max_retry_interval, not enforce max_retry_interval if it is not specified, or continue to fail, but with a warning about providing max_retry_interval?

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.