fix domain cleanup when a removed account owns templates#13630
Open
Damans227 wants to merge 1 commit into
Open
fix domain cleanup when a removed account owns templates#13630Damans227 wants to merge 1 commit into
Damans227 wants to merge 1 commit into
Conversation
…or resource count recalculation
Collaborator
Author
|
@blueorangutan package |
|
@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13630 +/- ##
============================================
+ Coverage 17.69% 19.65% +1.96%
- Complexity 15829 19806 +3977
============================================
Files 5925 6368 +443
Lines 533534 575107 +41573
Branches 65267 70376 +5109
============================================
+ Hits 94412 113043 +18631
- Misses 428444 449770 +21326
- Partials 10678 12294 +1616
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18595 |
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 #13612
Deleting a domain with cleanup fails when an account in it owns a template. During cleanup the account is removed first, then its templates are deleted, and the template's resource-count recalculation used
findById(which skips removed rows) and threw "Unable to find account". This makes the recalculation include removed accounts, so the domain deletes in one pass. The caller privilege check is unchanged.Test:
Create a domain, an account under it, register a template under that account, then delete the domain with cleanup.
Before: fails.
After: deletes in one pass. Log from the delete job: