Skip to content

[docs] Argument max_attempts doc string maybe confusion #114

@avilaton

Description

@avilaton

We are trying to limit a ctx.run block from running any retries and got a bit confused by this. The python sdk docstring says number of retry attempts:

max_attempts – The maximum number of retry attempts to complete the action. If None, the action will be retried indefinitely, until it succeeds. Otherwise, the action will be retried until the maximum number of attempts is reached and then it will raise a TerminalError.

So we thought we needed to set it to zero to avoid retrying altogether.
Either way, we tried both and got the exact same result by using 0 and 1.
Not an urgent issue, just trying to see if this helps anybody else.

From a discussion in discord here is a suggestion I came up with:

max_attempts=0 could mean No attempts and raise an error or something. Either way we figured it out already and just correcting the docstring might be good enough, from

max_attempts – The maximum number of retry attempts to complete the action.

to

max_attempts – The maximum number of attempts to complete the action.

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