ephraimbuddy commented on code in PR #71214:
URL: https://github.com/apache/airflow/pull/71214#discussion_r4629825202


##########
airflow-core/src/airflow/utils/db_cleanup.py:
##########
@@ -286,7 +286,8 @@ def readable_config(self):
     _TableConfig(
         table_name="callback",
         recency_column_name="created_at",
-        extra_columns=["id", "state"],
+        extra_columns=["id", "state", "dagrun_id"],
+        dag_id_scope=_IndirectDagScope(fk_column="dagrun_id", 
referenced_table="dag_run"),

Review Comment:
   Legacy triggerer callbacks retain a null `dagrun_id`, which passes the 
exclusion filter. Adding callback cleanup to `-t dag_run` can therefore delete 
callbacks and deadlines belonging to excluded Dags. Please backfill 
deadline-backed callbacks and preserve unknown ownership during scoped cleanup.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to