You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/23 16:43:18 UTC
[GitHub] [airflow] eladkal edited a comment on pull request #18471: Improve error message for BranchPythonOperator when no task_id to follow
eladkal edited a comment on pull request #18471:
URL: https://github.com/apache/airflow/pull/18471#issuecomment-925980093
@uranusjr correct me if I'm wrong but this requires rewriting [skip_all_except](https://github.com/apache/airflow/blob/958b679dae6bbd9def7c60191c3a7722ce81382a/airflow/models/skipmixin.py#L134)
The way I see it I can't just blindly skip all downstream tasks as unlike `ShortCircuitOperator` branching does respect trigger rules so I need to skip all downstream tasks until a join/junction task is found.
Since my input is None we need to search if such junction exists.
So I need to set difference between two cases:
If I have a case of:
# branch -----> task2
# \
# \
# task1
Then I need to execute [skip](https://github.com/apache/airflow/blob/958b679dae6bbd9def7c60191c3a7722ce81382a/airflow/models/skipmixin.py#L66)
but If I have a case like:
# branch -----> task2 <----- task3
# \
# \
# task1
Then I need to run `skip_all_except(context['ti'],['task2])` because task2 may still run depends on its `trigger_rule`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org