Skip to content

Flow retry functionality lacks parity with task retry functionality #14603

Closed

Description

@discdiver

First check

  • I added a descriptive title to this issue.
  • I used the GitHub search to find a similar request and didn't find it.
  • I searched the Prefect documentation for this feature.

Describe the current behavior

Flows retries don't include a custom retry function option.

Retry delay options don't include a list of values, jitter, or exponential backoff.

This expands #9139 quite a bit, so closing that issue.

Describe the proposed behavior

Example use of expanded retry delay behavior:

@ flow (
retries=3,
retry_delay_seconds=exponential_backoff(backoff_factor=10),
retry_jitter_factor=1,
)

Example Use

Better flexibility and better outcomes. Also less surprising behavior for flows if functionality matches tasks.

Additional context

No response

Activity

  1. added
    enhancement
    on Jul 15, 2024
  2. cicdw commented on Jul 15, 2024

    @cicdw
    Contributor

    I want to be careful with issues like this - having flows and tasks mirror each other isn't a worthy goal in and of itself; for example, what errors should a flow retry on that wouldn't be better encapsulated and caught within a task? We need to have principled motivations for these interface extensions, not just matching the concepts for its own sake. I'm not suggesting that some part of this issue isn't worthwhile, but the motivation is lacking to me.

  3. aaazzam commented on Jul 16, 2024

    @aaazzam
    Contributor

    I'm converting this issue to a discussion to allow for a more open-ended conversation about the proposed flow retry enhancements. As @cicdw pointed out, we need to explore more principled motivations and specific use cases for this functionality at the flow level.

    We invite contributors to share:

    • Detailed use cases where enhanced retry functionality (custom retry functions, jitter, exponential backoff) is necessary at the flow level rather than the task level.
    • Examples demonstrating why this functionality can't be effectively handled by individual tasks.
    • Any other insights or experiences related to flow-level retry needs.

    This discussion will help us evaluate whether and how to implement these features. We look forward to a productive conversation!

  4. locked and limited conversation to collaborators on Jul 16, 2024
  5. converted this issue into a discussion #14621 on Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions