Skip to content

Skip downstream tasks on LLMBranchOperator reject - #71073

Merged
guan404ming merged 3 commits into
apache:mainfrom
guan404ming:llm-branch-reject-skip
Aug 27, 2026
Merged

Skip downstream tasks on LLMBranchOperator reject#71073
guan404ming merged 3 commits into
apache:mainfrom
guan404ming:llm-branch-reject-skip

Conversation

@guan404ming

@guan404mingguan404ming commented Aug 4, 2026

Copy link
Copy Markdown
Member

Why

  • Rejecting an LLMBranchOperator review failed the task, leaving downstream tasks upstream_failed.
  • ApprovalOperator treats reject as a human decision and skips downstream instead; failing on reject is documented as generally discouraged.
  • Follow-up to review feedback on Support require_approval in LLMBranchOperator #70651.

How

  • Reject now runs do_branch(context, None), skipping every downstream task.
  • New fail_on_reject flag (default False) restores the old fail behavior, mirroring ApprovalOperator.
  • approval_timeout expiry still fails the task.

E2E

Verified in breeze: trigger, review pauses the task, hit Reject, route_ticket ends success and all downstream branches end skipped (previously upstream_failed).

llm_branch_reject_skip_demo.webm

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Fable 5)

Generated-by: Claude Code (Fable 5) following the guidelines

@guan404ming
guan404ming marked this pull request as ready for review August 4, 2026 15:09
@guan404ming
guan404mingforce-pushed the llm-branch-reject-skip branch 2 times, most recently from 5e7f377 to a8db156CompareAugust 5, 2026 12:36
Comment threadproviders/common/ai/src/airflow/providers/common/ai/operators/llm_branch.py Outdated
Comment threadproviders/common/ai/src/airflow/providers/common/ai/operators/llm_branch.py Outdated
@guan404ming
guan404ming requested a review from kaxilAugust 11, 2026 01:58
Comment threadproviders/common/ai/docs/operators/llm_branch.rst Outdated
@guan404ming
guan404ming requested a review from kaxilAugust 13, 2026 01:51
@guan404ming
guan404mingforce-pushed the llm-branch-reject-skip branch from ea57bb8 to 70d460fCompareAugust 19, 2026 05:05
@guan404ming
guan404ming requested a review from ashb as a code ownerAugust 19, 2026 05:05
@guan404ming
guan404mingforce-pushed the llm-branch-reject-skip branch from 8228980 to 39c6eeeCompareAugust 27, 2026 09:50
@guan404ming
guan404mingforce-pushed the llm-branch-reject-skip branch from 39c6eee to 38eee57CompareAugust 27, 2026 12:15
@guan404ming

Copy link
Copy Markdown
MemberAuthor

Thanks!

@guan404ming
guan404ming merged commit 44ea075 into apache:mainAug 27, 2026
83 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@guan404ming@Lee-W@kaxil