Marco
02/23/2021, 12:36 PMsandy
02/23/2021, 3:56 PMcontext.instance
to find whether the that step failed or ran in the relevant pipeline runs.
We could do a better job documenting and exposing the methods on the instance, but here they are: https://docs.dagster.io/_apidocs/internals#dagster.DagsterInstance
You may need to use semi-private APIs.
I believe you can do something like
step_stats = context.instance.get_run_step_stats(run_id, step_key)
status = step_stats.status
if status.value == "SKIPPED": # or "FAILED"
# do something
Marco
02/23/2021, 4:30 PMsandy
02/23/2021, 4:36 PMfrom dagster import Failure
@solid
def my_solid(_):
yield Failure()
Marco
02/23/2021, 4:38 PMsandy
02/23/2021, 9:29 PMrun_key=None
or use a unique run key if you wanted to be able to do two different submissionsMarco
02/23/2021, 9:30 PM