seanmuth opened a new pull request, #70147: URL: https://github.com/apache/airflow/pull/70147
Celery result backends are commonly provisioned into their own database schema, separate from Airflow's metadata tables. `airflow db clean` has no way to reach `celery_taskmeta` / `celery_tasksetmeta` in that case, since it only ever looks in the connection's default schema, so those tables are silently skipped every time. `_TableConfig`, `reflect_tables`, and the archive/export/drop machinery in `db_cleanup.py` now understand schema-qualified table names (`"schema.table"` dot notation). A new `[celery] result_backend_schema` config option lets a deployment point the built-in `celery_taskmeta` / `celery_tasksetmeta` configs at the schema they actually live in, without needing a fork or manual per-table config. Verified end-to-end against a real Postgres instance: clean → archive (lands in the same schema as the source table) → export → drop, all schema-aware. New unit + integration tests cover schema parsing, the config-driven wiring, and the full cleanup cycle; existing test suite passes unmodified on both sqlite and Postgres. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Sonnet 5) Generated-by: Claude Code (Sonnet 5) 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]
