ecodina opened a new issue, #34207:
URL: https://github.com/apache/airflow/issues/34207

   ### 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
   
   1. Create `dag1` which contains a simple task (e.g. sleep for 60 seconds)
   2. Create `dag2` which contains an ExternalTaskSensor checking for `dag1` 
(`external_task_id=None`) and runs in deferrable mode
   3. 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
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to