You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clearing a DAG run/task instance with a DagRunQueuedAtDeadline fails with TypeError: unsupported type for timedelta seconds component: dict #70368
Clearing a failed DAG run or task instance returns HTTP 500 ("Internal Service Error") in the UI when the DAG defines a deadline that references the DAG run's queued_at time (DeadlineReference.DAGRUN_QUEUED_AT). The API server logs:
TypeError: unsupported type for timedelta seconds component: dict
What you think should happen instead
The clear should succeed, and the queued-at deadline should be recalculated against the new queued_at.
Root cause
In 3.3.0, migration 0117_3_3_0_change_deadline_interval_to_json.py (from #64751, which added VariableInterval support) changed the deadline_alert.interval column from FLOAT to JSON. Existing values were rewritten into the serde envelope, e.g. {"__classname__": "datetime.timedelta", "__version__": 2, "__data__": 3600.0}.
_recalculate_dagrun_queued_at_deadlines() in airflow-core/src/airflow/models/taskinstance.py (called from clear_task_instances) still reads the raw column and does timedelta(seconds=deadline_alert.interval), passing the JSON dict straight into timedelta. Every other consumer (DagRun creation in serialization/definitions/dag.py, the model __repr__) decodes the JSON first. Only the clear path was missed.
How to reproduce
Define a DAG with a deadline referencing DeadlineReference.DAGRUN_QUEUED_AT.
Let a run queue so a Deadline row is created.
Clear the DAG run or one of its task instances.
The API server returns 500 with the TypeError above.
Workarounds
Delete the task instance in the UI instead of clearing it.
Temporarily remove the deadline parameter from the DAG.
Activity
Fix TypeError clearing a DAG run when a queued-at deadline interval i…
Share deadline alert interval decoding between DagRun creation and clear
fjmacagno commentedon Sep 9, 2026
We are running into this issue and would love a fix.
Fix TypeError clearing a DAG run when a queued-at deadline interval i…
Share deadline alert interval decoding between DagRun creation and clear
Fix TypeError clearing a DAG run when a queued-at deadline interval i…
Share deadline alert interval decoding between DagRun creation and clear
Fix TypeError clearing a DAG run when a queued-at deadline interval i…