-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Closed
Labels
affected_version:3.0Issues Reported for 3.0Issues Reported for 3.0affected_version:main_branchIssues Reported for main branchIssues Reported for main brancharea:async-operatorsAIP-40: Deferrable ("Async") OperatorsAIP-40: Deferrable ("Async") Operatorsarea:corekind:bugThis is a clearly a bugThis is a clearly a bugpriority:highHigh priority bug that should be patched quickly but does not require immediate new releaseHigh priority bug that should be patched quickly but does not require immediate new release
Milestone
Description
Apache Airflow version
main (development)
If "Other Airflow 2 version" selected, which one?
No response
What happened?
ERROR - Trigger failed:
Traceback (most recent call last):
File "/opt/airflow/airflow-core/src/airflow/jobs/triggerer_job_runner.py", line 965, in create_triggers
trigger_instance = trigger_class(**deserialised_kwargs)
File "/opt/airflow/providers/standard/src/airflow/providers/standard/triggers/temporal.py", line 51, in __init__
raise TypeError(f"Expected datetime.datetime type for moment. Got {type(moment)}")
TypeError: Expected datetime.datetime type for moment. Got <class 'str'>
[2025-08-26, 12:44:51] ERROR - Task failed with exception
TaskDeferralError: Trigger failure
File "/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py", line 919 in run
File "/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py", line 1301 in _execute_task
File "/opt/airflow/task-sdk/src/airflow/sdk/bases/sensor.py", line 255 in resume_execution
File "/opt/airflow/task-sdk/src/airflow/sdk/bases/operator.py", line 1614 in resume_executionWhat you think should happen instead?
No response
How to reproduce
Run the below dag in main branch:
from airflow.sdk import DAG
from airflow.providers.standard.operators.empty import EmptyOperator
from airflow.providers.standard.operators.python import PythonOperator
from airflow.providers.standard.sensors.date_time import DateTimeSensorAsync
from airflow.utils.trigger_rule import TriggerRule
from pendulum import datetime
with DAG(
dag_id='example_deferrable_dag',
start_date=datetime(2023, 1, 1),
catchup=False,
tags=['async'],
) as dag:
start = EmptyOperator(
task_id='start'
)
wait = DateTimeSensorAsync(
task_id='wait_for_time',
target_time="""{{ macros.datetime.utcnow() + macros.timedelta(minutes=1) }}"""
)
end = EmptyOperator(
task_id='end'
)
start >> wait >> endOperating 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?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
affected_version:3.0Issues Reported for 3.0Issues Reported for 3.0affected_version:main_branchIssues Reported for main branchIssues Reported for main brancharea:async-operatorsAIP-40: Deferrable ("Async") OperatorsAIP-40: Deferrable ("Async") Operatorsarea:corekind:bugThis is a clearly a bugThis is a clearly a bugpriority:highHigh priority bug that should be patched quickly but does not require immediate new releaseHigh priority bug that should be patched quickly but does not require immediate new release