-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Description
Apache Airflow version
2.7.1
What happened
When running an ExternalTaskSensor with external_task_id=None
and in deferrable mode, the trigger doesn't wait for the entire DAG since it needs a task_id
. However, the typing suggests this should be possible: https://github.com/apache/airflow/blob/main/airflow/triggers/external_task.py#L63
I believe this is the query that doesn't behave as expected from the typing: https://github.com/apache/airflow/blob/main/airflow/triggers/external_task.py#L135
Moreover, after examining the code, it seems the trigger would also fail if the ExternalTaskSensor was provided with an external_task_ids
(multiple tasks).
What you think should happen instead
No response
How to reproduce
- Create
dag1
which contains a simple task (e.g. sleep for 60 seconds) - Create
dag2
which contains an ExternalTaskSensor checking fordag1
(external_task_id=None
) and runs in deferrable mode - Run them and see how
dag2
times out because it can't find any task.
Operating System
Ubuntu 22.04.3 LTS
Versions of Apache Airflow Providers
No response
Deployment
Virtualenv installation
Deployment details
No response
Anything else
Similarly to #34204 I'd love to submit a PR, but have no available time to properly do so or the knowledge to make sure any of my solutions actually work in all cases.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct