Let providers contribute tables to 'db clean' - #70639
Conversation
This adds a 'db-cleanup-tables' key in provider.yaml to specify a callable returning cleanup configs, discovered via ProvidersManager. The 'db clean' command merges them into the list of tables to clean at runtime. Celery uses it to register 'celery_taskmeta' and 'celery_tasksetmeta' tables, using the '[celery] result_backend_schema' config that schema-qualifies them when the result backend is in its own schema. This allows them to always be correctly found by the 'db clean' command. Both are removed from Core's hardcoded list.
6e2609b to
1ffe313
Compare
|
Thanks for teasing this apart — I think the direction is right and worth landing. The thing that makes this feel load-bearing rather than tidying: #70147 shipped schema support but no user-reachable knob for the two tables it was actually motivated by, so deployments with a separate result-backend schema get a silently-skipped A few interface points I'd raise, in the order they bother me:
On the two candidates:
Neither is urgent; both fall out cleanly once the extension point is in. Drafted-by: Claude Code (Opus 5); reviewed by @dheerajturaga before posting |
This is the follow-up mentioned in #70147.
A 'db-cleanup-tables' key in provider.yaml is added to specify a callable returning cleanup configs, discovered via ProvidersManager. The 'db clean' command merges them into the list of tables to clean at runtime.
Celery uses it to register 'celery_taskmeta' and 'celery_tasksetmeta' tables, using the '[celery] result_backend_schema' config that schema-qualifies them when the result backend is in its own schema. This allows them to always be correctly found by the 'db clean' command. Both are removed from Core's hardcoded list.
Possible future candidates (no Core change needed, deferred to their maintainers): FAB's session table and the edge3 tables.