hedrickw opened a new issue #13681: URL: https://github.com/apache/airflow/issues/13681
<!-- Welcome to Apache Airflow! For a smooth issue process, try to answer the following questions. Don't worry if they're not all applicable; just try to include what you can :-) If you need to include code snippets or logs, please put them in fenced code blocks. If they're super-long, please use the details tag like <details><summary>super-long log</summary> lots of stuff </details> Please delete these comment blocks before submitting the issue. --> <!-- IMPORTANT!!! PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE NEXT TO "SUBMIT NEW ISSUE" BUTTON!!! PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!! Please complete the next sections or the issue will be closed. These questions are the first thing we need to know to understand the context. --> **Apache Airflow version**: 2.0 **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): 1.18 **Environment**: Linux - **Cloud provider or hardware configuration**: AWS - **OS** (e.g. from /etc/os-release): Linux - **Kernel** (e.g. `uname -a`): - **Install tools**: - **Others**: **What happened**: Following the example below https://github.com/apache/airflow/blob/master/airflow/example_dags/example_external_task_marker_dag.py, when you trigger the parent task, it succeeds so then you trigger the child task it goes into reschedule loop until it times out because the execution date filter is only single list object of the child execution task which wont ever be the same as the parent. https://github.com/apache/airflow/blob/master/airflow/sensors/external_task.py#L216 ``` IRFLOW_CTX_DAG_OWNER=airflow AIRFLOW_CTX_DAG_ID=example_external_task_marker_child AIRFLOW_CTX_TASK_ID=child_task1 AIRFLOW_CTX_EXECUTION_DATE=2021-01-14T17:33:14.178268+00:00 AIRFLOW_CTX_DAG_RUN_ID=manual__2021-01-14T17:33:14.178268+00:00 [2021-01-14 17:33:49,750] {external_task.py:153} INFO - Poking for example_external_task_marker_parent.parent_task on 2021-01-14T17:33:14.178268+00:00 ... [2021-01-14 17:33:49,889] {taskinstance.py:1386} INFO - Rescheduling task, marking task as UP_FOR_RESCHEDULE [2021-01-14 17:33:49,928] {local_task_job.py:118} INFO - Task exited with return code 0 [2021-01-14 17:35:22,581] {taskinstance.py:826} INFO - Dependencies all met for <TaskInstance: example_external_task_marker_child.child_task1 2021-01-14T17:33:14.178268+00:00 [queued]> [2021-01-14 17:35:22,626] {taskinstance.py:826} INFO - Dependencies all met for <TaskInstance: example_external_task_marker_child.child_task1 2021-01-14T17:33:14.178268+00:00 [queued]> [2021-01-14 17:35:22,627] {taskinstance.py:1017} INFO - -------------------------------------------------------------------------------- [2021-01-14 17:35:22,627] {taskinstance.py:1018} INFO - Starting attempt 1 of 1 [2021-01-14 17:35:22,627] {taskinstance.py:1019} INFO - -------------------------------------------------------------------------------- [2021-01-14 17:35:22,657] {taskinstance.py:1038} INFO - Executing <Task(ExternalTaskSensor): child_task1> on 2021-01-14T17:33:14.178268+00:00 [2021-01-14 17:35:22,665] {standard_task_runner.py:51} INFO - Started process 24 to run task [2021-01-14 17:35:22,678] {standard_task_runner.py:75} INFO - Running: ['airflow', 'tasks', 'run', 'example_external_task_marker_child', 'child_task1', '2021-01-14T17:33:14.178268+00:00', '--job-id', '53', '--pool', 'default_pool', '--raw', '--subdir', 'DAGS_FOLDER/dags/examples/external_sensor.py', '--cfg-path', '/tmp/tmpzb2z00at'] [2021-01-14 17:35:22,680] {standard_task_runner.py:76} INFO - Job 53: Subtask child_task1 [2021-01-14 17:35:22,881] {logging_mixin.py:103} INFO - Running <TaskInstance: example_external_task_marker_child.child_task1 2021-01-14T17:33:14.178268+00:00 [running]> on host exampleexternaltaskmarkerchildchildtask1-e6a0f9157da74583bb7373 [2021-01-14 17:35:23,667] {taskinstance.py:1230} INFO - Exporting the following env vars: AIRFLOW_CTX_DAG_OWNER=airflow AIRFLOW_CTX_DAG_ID=example_external_task_marker_child AIRFLOW_CTX_TASK_ID=child_task1 AIRFLOW_CTX_EXECUTION_DATE=2021-01-14T17:33:14.178268+00:00 AIRFLOW_CTX_DAG_RUN_ID=manual__2021-01-14T17:33:14.178268+00:00 [2021-01-14 17:35:23,695] {external_task.py:153} INFO - Poking for example_external_task_marker_parent.parent_task on 2021-01-14T17:33:14.178268+00:00 ... [2021-01-14 17:35:23,833] {taskinstance.py:1386} INFO - Rescheduling task, marking task as UP_FOR_RESCHEDULE [2021-01-14 17:35:23,852] {local_task_job.py:118} INFO - Task exited with return code 0 [2021-01-14 17:36:59,125] {taskinstance.py:826} INFO - Dependencies all met for <TaskInstance: example_external_task_marker_child.child_task1 2021-01-14T17:33:14.178268+00:00 [queued]> [2021-01-14 17:36:59,172] {taskinstance.py:826} INFO - Dependencies all met for <TaskInstance: example_external_task_marker_child.child_task1 2021-01-14T17:33:14.178268+00:00 [queued]> [2021-01-14 17:36:59,172] {taskinstance.py:1017} INFO - ``` <!-- (please include exact error messages if you can) --> **What you expected to happen**: I would expect the filter to be a range not a single timestamp? Or we should be able to send in a date instead of a datetime? <!-- What do you think went wrong? --> **How to reproduce it**: Run this Example https://github.com/apache/airflow/blob/master/airflow/example_dags/example_external_task_marker_dag.py <!--- As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags. If you are using kubernetes, please attempt to recreate the issue using minikube or kind. ## Install minikube/kind - Minikube https://minikube.sigs.k8s.io/docs/start/ - Kind https://kind.sigs.k8s.io/docs/user/quick-start/ If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action You can include images using the .md style of  To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file. ---> **Anything else we need to know**: <!-- How often does this problem occur? Once? Every time etc? Any relevant logs to include? Put them here in side a detail tag: <details><summary>x.log</summary> lots of stuff </details> --> ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
