Deleting dag runs

6,284 views
Skip to first unread message

Sergei Iakhnin

unread,
Mar 5, 2016, 8:21:15 AM3/5/16
to Airflow
Is there a way to delete some manually triggered dag runs along with their tasks?

Thanks in advance,

Sergei.

Maxime Beauchemin

unread,
Mar 5, 2016, 3:16:47 PM3/5/16
to Airflow
Only through the UI for now, no CLI utility to do that yet... You can always `from airflow.model import DagrRun` and use the ORM to delete them programmatically. 

Sergei Iakhnin

unread,
Mar 6, 2016, 2:34:04 PM3/6/16
to Airflow
Ah, ok. Does the latter delete things cleanly, with their associated tasks and jobs?

Maxime Beauchemin

unread,
Mar 7, 2016, 10:45:27 PM3/7/16
to Airflow
No, deleting DagRuns doesn't affect related task instances.

Tyrone Hinderson

unread,
Mar 17, 2016, 12:47:35 PM3/17/16
to Airflow
As far as I understand, DagRuns exist solely to help the scheduler keep track of what tasks it can run. They are created by external and time-based triggers, and deleted only manually. Depending on a DAG's schedule, a deleted DagRun might be quickly replaced but no running tasks should ever be effected.
Reply all
Reply to author
Forward
0 new messages