Hello! I'm new to Dagster and have a question abou...
# announcements
l
Hello! I'm new to Dagster and have a question about Dagstermill. I want to retry my notebook solid if the notebook raises an exception. If this was a regular solid I think I would do something like
Copy code
@solid
def flakes():
    try:
        flakey_operation()
    except:
        raise RetryRequested(max_retries=3)
And so from my notebook I would like to do something like
Copy code
dagstermill.yield_event(RetryRequested(max_retries=3))
However, this isn't allowed because the argument to
yield_event
is of type
Union[dagster.Materialization, dagster.ExpectationResult, dagster.TypeCheck, dagster.Failure]
. Is there a workaround for this? Or more generally, is this the correct pattern for retrying a notebook or is there a better approach? Thanks! cc: @victor
a
hm ya this appears to be an oversight with how dagstermill and retries work
@Dagster Bot issue retries in dagstermill
d
a
cc @max incase theres something im overlooking
m
no i think this is a straight oversight
l
Thanks for looking into it
v
@max, @alex - Would this be fixed just by adding
RetryRequested
to the allowed types in the runtime type check of
Manager.yield_event
or does it need more work in the papermill solid driver?
a
believe it will need a little more work - looking in to it
keanu thanks 1
diff out should make it in for the release this week
l
Thanks @alex, appreciate it!