[
https://issues.apache.org/jira/browse/AIRFLOW-5523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16990015#comment-16990015
]
Chris Palmer commented on AIRFLOW-5523:
---------------------------------------
What is the goal here? If it is to clean up the DAGs shown in the UI then there
are other ways to hide those (maybe in the same way that we can hide paused
DAGs). If it is to clean up the database then I worry that automating this
could have unintended consequences.
If I'm not mistaken, currently deleting a DAG via the UI or CLI results in all
database records being deleted, including task instances and dag runs. Is the
intention of this ticket to do that full DAG deletion, or is it only to delete
the row in the dag table? If the former then I think that is a really bad idea.
It would only take one small mistake in syncing/deploying your dag files, for
the scheduler to delete all your history which could be a major problem.
> DAGs never get cleaned up from webservers if DAG file is removed from the
> scheduler
> -----------------------------------------------------------------------------------
>
> Key: AIRFLOW-5523
> URL: https://issues.apache.org/jira/browse/AIRFLOW-5523
> Project: Apache Airflow
> Issue Type: Bug
> Components: webserver
> Affects Versions: 1.10.5
> Reporter: Dan Davydov
> Priority: Major
> Attachments: Screen Shot 2019-09-19 at 4.39.24 PM.png
>
>
> DAGs are never removed from the DB if the DAG file used to generate the DAGs
> is removed. This causes the webserver to accumulate broken dag rows (see
> attached screenshot).
> The scheduler should delete all DAGs from the DAG table with files that no
> longer exist when it scans the DAGs folder for files.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)