Repository navigation
Key Error in External Task Sensor when using execution_date_fn #52236
Copy link
Copy link
Closed
Labels
area:providersgood first issuekind:bugThis is a clearly a bugThis is a clearly a bugprovider:standard
Description
Activity
added on Jun 25, 2025
kind:bugThis is a clearly a bugThis is a clearly a bug
needs-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
added and removed on Jun 25, 2025
needs-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
added a commit that references this issue on Jun 28, 2025
Could you please share the log ?
@gopidesupavan TIA, please also review my PR.
Here is the log:
ERROR - Task failed with exception: source="task"
KeyError: 'logical_date'
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/task_runner.py", line 867 in run
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/task_runner.py", line 1159 in _execute_task
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/bases/operator.py", line 397 in wrapper
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/standard/sensors/external_task.py", line 427 in execute
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/bases/operator.py", line 397 in wrapper
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/bases/sensor.py", line 227 in execute
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/bases/sensor.py", line 207 in execute
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/standard/sensors/external_task.py", line 282 in poke
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/standard/sensors/external_task.py", line 272 in _get_dttm_filter
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/standard/sensors/external_task.py", line 543 in _handle_execution_date_fnadded a commit that references this issue on Jul 26, 2025
added a commit that references this issue on Aug 7, 2025
added a commit that references this issue on Aug 11, 2025
Metadata
Metadata
Assignees
Labels
area:providersgood first issuekind:bugThis is a clearly a bugThis is a clearly a bugprovider:standard
Apache Airflow Provider(s)
standard
Versions of Apache Airflow Providers
1.3.0
Apache Airflow version
3.0.2
Operating System
Debian GNU/Linux 12 (bookworm)
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
What happened
There is a key error of
logical_datewhen usingexecution_date_fninExternalTaskSensorairflow/providers/standard/src/airflow/providers/standard/sensors/external_task.py
Lines 532 to 545 in 460b1c6
What you think should happen instead
Should pass the
logical_dateargs from callerairflow/providers/standard/src/airflow/providers/standard/sensors/external_task.py
Lines 261 to 273 in 460b1c6
How to reproduce
Use
execution_date_fninExternalTaskSensorAnything else
No response
Are you willing to submit PR?
Code of Conduct