alexandrusoare opened a new pull request, #44892:
URL: https://github.com/apache/superset/pull/44892

   ### SUMMARY
   
   The scheduled purge discovers what to purge through the `SoftDeleteMixin` 
subclass registry, which any model adopting the mixin joins automatically — 
including models belonging to a host distribution built on Superset. The purge 
policy registry, by contrast, is a closed dict of three roots, so such a model 
is discovered and then cannot be purged. #44874  made that case report itself 
instead of failing per row; this adds the way out of it.
   
   `purge_policy_registry()` is split into the built-in declarations, unchanged 
and still built once per process, and an index over those plus any policies a 
host installed under the new `PURGE_POLICIES_FUNC` config key. Installed 
policies are validated against the discovered dependency graph exactly as the 
built-in ones are, so a declaration that doesn't match the real foreign keys is 
rejected rather than used to delete rows.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to