Skip to content
Discussion options

You must be logged in to vote

Currently, upstream failure will always cause downstream ops to be skipped. Here's an issue where we're tracking loosening this: #15761.

One workaround is a combination of:

  • Non-required outputs
  • Using a try/except to catch errors and only yielding the Output if there are not errors
  • Fan-in inputs

Here's an example:

from dagster import op, job, Out, Output


@op(out=Out(is_required=False))
def op1():
    try:
        yield Output(5)
    except:
        ...


@op(out=Out(is_required=False))
def op2():
    try:
        raise RuntimeError("something")
        yield Output(6)
    except:
        ...


@op
def op3(in1: list[int]):
    assert in1 == [5]


@job
def job1():
    op3([op1(), op2()])

o…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@stasharrofi
Comment options

@Auric-Manteo
Comment options

Answer selected by sryza
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area: ops/graphs/jobs Related to Dagster ops, graphs and jobs
4 participants