Fix cascaded Discipline delete blockers for Division#7999
Merged
acwhite211 merged 12 commits intov7_12_0_5from Apr 24, 2026
Merged
Fix cascaded Discipline delete blockers for Division#7999acwhite211 merged 12 commits intov7_12_0_5from
acwhite211 merged 12 commits intov7_12_0_5from
Conversation
Triggered by 3b57b8b on branch refs/heads/issue-7998
CarolineDenis
approved these changes
Apr 22, 2026
emenslin
approved these changes
Apr 23, 2026
kwhuber
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes #7998
Fixes the remaining cascaded delete blockers cases related to #7797 that were not covered by #7833.
The previous fix only applied discipline-specific cleanup when
Disciplinewas the base table being checked. That left a gap for parent records likeDivision, where Django cascades into relatedDisciplinerows during delete blocker collection. In that path, discipline-owned setup rows such asSpexportschema_exportmappingcould still surface and break the System Config UI.I also found an issue with registry validation compared sorted policy keys. It treated action array order as significant. That caused false
"operationPolicies is out of date"errors when the front-end and back-end exposed the same actions in a different order.Changes
By normalize policy resource keys before comparison and normalize each resource's action array before comparison, the issue is solved. Equivalent policy definitions no longer fail registry validation just because of action ordering differences.
The
delete_blockersrequest it still taking a while to run when there are a lot of delete blockers. In the future, we could try looking more into trying to speed it up.Checklist
self-explanatory (or properly documented)
Testing instructions
Divisionthat has a relatedDiscipline. (ex. sp7demofish)Disciplinehas discipline-scoped setup data, such as export schema mappings.Division.