Fix none_failed_min_one_success trigger rule checks#67873
Open
nailo2c wants to merge 3 commits into
Open
Conversation
Pedrinhonitz
suggested changes
Jun 2, 2026
Pedrinhonitz
approved these changes
Jun 2, 2026
Contributor
Pedrinhonitz
left a comment
There was a problem hiding this comment.
This is fine by me, we can move on to a member review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
none_failed_min_one_successrequires all upstream tasks to avoidfailed/upstream_failedand at least one upstream task to succeed.The existing
TriggerRuleDepdep-check path shared the same failure-count logic asnone_failed. As a result, zero-success upstream states could be reported as dependencies met, even though the trigger rule's min-one-success contract could not be satisfied.This showed up in two counterexamples:
flag_upstream_failed=False, where direct dependency checks such asairflow tasks failed-depsmissed the trigger-rule failure reason;removed, where the scheduler rewrite path also did not assign a terminal failure state.Before the fix,
airflow tasks failed-depsdid not report the trigger-rule violation for an all-skipped upstream case:Reproduction Dag
After the fix, the missing trigger-rule dependency is reported:
Fix
Fail the
none_failed_min_one_successdep check whenever no upstream task has succeeded.Also extend the
flag_upstream_failed=Truerewrite path so that, once all upstreams are terminal and none succeeded, the downstream task instance is markedUPSTREAM_FAILED. This covers mapped tasks whose relevant upstream task instances were allremoved.The existing all-skipped behavior is preserved: that case is still rewritten to
SKIPPEDbefore the new all-terminal zero-success branch can run.Test
Updated regression coverage for
none_failed_min_one_success:flag_upstream_failed=TrueandFalse;flag_upstream_failed=Truethe task instance is rewritten toUPSTREAM_FAILED.Verified with:
Result:
4 passed, 1 warning.Reported by
SMT solver sweep of Airflow trigger-rule semantics using a local Z3 model.
Was generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-5) following the guidelines