/### Apache Airflow version
3.0.0b2
If "Other Airflow 2 version" selected, which one?
No response
What happened?
DayOfWeekSensor is failing when logical date is null and argument 'use_task_logical_date' is True
- Task failed with exception logger="task" error_detail=[{"exc_type":"KeyError","exc_value":"'logical_date'","syntax_error":null,"is_cause":false,"frames":[{"filename":"/opt/airflow/task_sdk/src/airflow/sdk/execution_time/task_runner.py","lineno":609,"name":"run"},{"filename":"/opt/airflow/task_sdk/src/airflow/sdk/execution_time/task_runner.py","lineno":730,"name":"_execute_task"},{"filename":"/opt/airflow/airflow/models/baseoperator.py","lineno":168,"name":"wrapper"},{"filename":"/opt/airflow/airflow/sensors/base.py","lineno":287,"name":"execute"},{"filename":"/opt/airflow/airflow/sensors/base.py","lineno":267,"name":"execute"},{"filename":"/opt/airflow/providers/standard/src/airflow/providers/standard/sensors/weekday.py","lineno":107,"name":"poke"}]}]
What you think should happen instead?
DayOfWeekSensor should work with null logical date and argument 'use_task_logical_date'=True
How to reproduce
Run the below DAG:
from pendulum import today
from airflow import DAG
from airflow.providers.standard.sensors.weekday import DayOfWeekSensor
with DAG(
"example_week_sensor",
schedule=None,
start_date=today('UTC').add(days=-2),
tags=[ "sensor"],
) as dag:
working_day_check = DayOfWeekSensor(
task_id="working_day_check",
# added weekend days so that no matter what any day of the week this sensor will work.
week_day={"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"},
use_task_logical_date=True,
poke_interval=20.0,
timeout=120.0,
dag=dag,
)
Operating System
Linux
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
/### Apache Airflow version
3.0.0b2
If "Other Airflow 2 version" selected, which one?
No response
What happened?
DayOfWeekSensor is failing when logical date is null and argument 'use_task_logical_date' is True
What you think should happen instead?
DayOfWeekSensor should work with null logical date and argument 'use_task_logical_date'=True
How to reproduce
Run the below DAG:
Operating System
Linux
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct