-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CiviGrant - Cleanup managed entities - fixes dev/core#3161 #23140
Conversation
- Ensure labels are translated - Set stricter cleanup policy for entities that should be removed on uninstall - Make grant_status options unmanaged. They will not be updated by the system ever, but they will be deleted on uninstall because the option group is a managed entity.
(Standard links)
|
@colemanw So I've had a mix of good+bad while testing this. First, for setup, I prepared a DB snapshot with some CiviGrant data:
To test an upgrade, I used this process: https://gist.github.com/totten/1b2ab35c941aede8550f1627ac20699c. After each DB upgrade, I would view Here the results from various upgrade paths:
So if you're doing a direct upgrade (5.45=>5.48), then But if you're doing multiple steps (5.45=>5.47=>5.48), then |
I stepped through the upgrade for 5.45=>5.47=>5.48 and confirmed that the Before that step, the DB data looks like:
After that step, it still has some metadata about the mgd's (albeit with diff
Which means that my existing grant records become illegal - because the
|
@colemanw I just ran tests going from < 5.47 to 5.48 and previous modifications to the statuses and types were retained (same results as Tim). I didn't go through an incremental test (upgrading to 5.47 and then later to 5.48). But it looks like Tim has the cause of problems there well documented. If you need me to run through that at some point let me know. |
Removes managed entities which may have been added during the 5.47 upgrade, to prevent the managed system from automatically deleting them.
Ok so just to clarify, from your POV @lcdservices this fixes your problem (with sites not yet on 5.47). @totten I've just pushed up another commit to prevent the managed grant statuses from being deleted. Can you re-test the |
@colemanw yes, this fixes the problem I experienced. |
Note: once this PR is ✔️ it will also need to be done for 5.49 -> master. |
My local was happy with the upgrades but CI wasn't -- I think it's because we needed the I retested, and it looks better. 👍
|
Merge on pass. Added forward-port for 5.49-rc: #23179 |
Overview
Improves the managed options that come with the CiviGrant extension, to prevent problems documented in dev/core#3161.
Technical Details
grant_status
options unmanaged. They will not be updated by the system ever, but they will be deleted on uninstall because the option group is a managed entity.'match'
option to prevent errors when items already exist (this also allows the 5.47 upgrader to be simplified).