https://flyte.org logo
Title
p

Pradithya Aria Pura

04/04/2023, 8:54 AM
I encountered issue with task retry, somehow the following task is not retried as per the configuration
@task(retries=2)
def should_fail():
    raise ValueError("fail")

@workflow 
def multi_task_pipeline_workflow():
    should_fail()
Is it a known issue or there is some admin configuration that need to be updated ?
NVM, I missed this part.
n

Niels Bantilan

04/04/2023, 8:57 PM
this is still an interesting topic tho @Pradithya Aria Pura, I feel like from a UX perspective exceptions raised explicitly in user-defined code should be recoverable. @Eduardo Apolinario (eapolinario) @Yee thoughts?
looking at some of the workflows I’ve been playing with, I think this is a bug
@Pradithya Aria Pura would you mind copy-pasting a screenshot when you click onf “Show Error”?
p

Pradithya Aria Pura

04/04/2023, 9:46 PM
I feel like from a UX perspective exceptions raised explicitly in user-defined code should be recoverable.
Agree with this. User-space exception might be thrown by some library that a task depends on, explicitly catching it and converting to
FlyteRecoverableException
might not be a lot of code but feel verbose, especially if we have to do it for every tasks. The error
Traceback (most recent call last):

      File "/usr/local/lib/python3.8/site-packages/flytekit/exceptions/scopes.py", line 203, in user_entry_point
        return wrapped(*args, **kwargs)
      File "/root/retry_workflows/multi_task_pipeline_workflow.py", line 57, in should_fail
        raise ValueError("fail")

Message:

    fail

User error.