Skip to content

Commit

Permalink
Add comment for bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Jan 5, 2023
1 parent aded619 commit c6e725d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/prefect/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,13 @@ def resolve_input(expr, context):
# Do not allow uncompleted upstreams except failures when `allow_failure` has
# been used
if not state.is_completed() and not (
isinstance(context.get("annotation"), allow_failure) and state.is_failed()
# TODO: Note that the contextual annotation here is only at the current level
# if `allow_failure` is used then another annotation is used, this will
# incorrectly evaulate to false — to resolve this, we must track all
# annotations wrapping the current expression but this is not yet
# implemented.
isinstance(context.get("annotation"), allow_failure)
and state.is_failed()
):
raise UpstreamTaskError(
f"Upstream task run '{state.state_details.task_run_id}' did not reach a 'COMPLETED' state."
Expand Down

0 comments on commit c6e725d

Please sign in to comment.