wolvery opened a new pull request, #72912:
URL: https://github.com/apache/airflow/pull/72912

   Include `serialized_dag` in `airflow db clean` table configurations.
   
   In Airflow 3, `SerializedDagModel` stores serialized definitions per 
`DagVersion`, accumulating JSON and binary data over time. Previously, 
`serialized_dag` was omitted from `db clean`, preventing operators from purging 
unreferenced historical serialized DAG records.
   
   This change:
   - Adds `serialized_dag` to `config_list` in `db_cleanup.py` with recency 
tracking on `created_at` and version reference checks.
   - Sets `keep_last=True` grouped by `dag_id` to preserve the latest 
serialized DAG definition.
   - Adds `serialized_dag` to `dag_version` dependent tables so serialized 
records and cascading `deadline_alert` rows are cleaned and archived before 
version records.
   - Adds unit tests covering retention, pruning, cascading, and CLI DAG ID 
filtering.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — OpenCode
   
   Generated-by: OpenCode following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


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