uranusjr opened a new issue #15986: URL: https://github.com/apache/airflow/issues/15986
**Apache Airflow version**: master When DagRuns are selected in the UI for deletion, a request is sent to the `DagRunModelView.action_muldelete`, a Flask-Appbuilder action: https://github.com/apache/airflow/blob/aa4713e43f92d3e4c68c3ad00e2d44caaf29aafe/airflow/www/views.py#L3490-L3496 The function deletes all the DagRun rows matching the selection from db. However, this does not delete the TaskInstance rows (also TaskFail, maybe more?) associated to the DagRun. This is also peripherally related to AIP-39; one of the issues here is there is not a concrete relatation between DagRun and its associates; they are all fetched by an implicit relation via their `dag_id` and `execution_date` values. So I guess the question here is two-way: Should we consider the current behaviour a bug and remove rows associated to a DagRun as well? And if not, how should be keep the behaviour after implementing AIP-39, which likely will link them together with concrete foreign keys? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
