https://dagster.io/ logo
#ask-community
Title
# ask-community
j

Jose Estudillo

01/06/2023, 12:17 PM
Hello team, I think is not possible but I thought I would ask before giving up, is there a way to know if a job or any of its ops have a retry policy thought the api (or from the job failure run event)?
c

claire

01/06/2023, 6:10 PM
j

Jose Estudillo

01/06/2023, 6:14 PM
Thanks @claire but not sure how this would work
I'm trying to get this information from a failure sensor, this have to work for local code and also workspaces coming from a grpc code server
I've been checking the data model in the graphql api
and I can see anything that models a retry
so at that time, I wont have the code, just the run metadata
I was expecting to get the job metadata, and with that check if it has retry policies
is that possible at all?
c

claire

01/06/2023, 6:33 PM
Ah I see, I misread your question. I think within a run failure sensor you could do something like this:
Copy code
@run_failure_sensor
def report_failure_sensor(context):
    context.dagster_run.tags
to detect any tag-based run retry policies. However, I don't think it's possible to detect if an op has a retry policy.
j

Jose Estudillo

01/08/2023, 11:04 AM
Thanks @claire I'll check that one