-
-
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
ExtensionUpgrades - Skip trying to upgrade missing dependencies #22623
Conversation
(Standard links)
|
Thanks @colemanw will take a look. |
I think this should be against 5.46 but otherwise this works well for me. After upgrade you get presented with two options and it's not clear which to do first, but the top one says "as soon as possible". Even if you do visit the extensions page first what happens is you get a popup alert about needing to run upgrades. So I think the average admin would run upgrades first, but it does still all work if you install search kit first too. |
e11d8d9
to
a2cd81c
Compare
Sounds like we could merge this and work out the messaging in a followup PR. |
I'd like @totten to weight in since this is his code I'm mangling, just to double-check that I'm not removing something important. |
Retest this please |
In the screenshot that @demeritcowboy showed above, it includes the status warning about "Extension Error": "Form Builder depends on org.civicrm.search_kit, which is not enabled." Two things:
I'd say those can fixed in 5.46/5.45 in the scope of dev/core#1306, but they don't have to be in this PR. |
Before: Missing dependencies would be added and then the extension upgrader would try and fail to upgrade them After: They are skipped, as missing extension dependencies are handled elsewhere This allows the extension upgrade to proceed without error, even if there are missing dependencies. The user will be prompted to install the missing dependencies afterward.
a77c3a8
to
13182e0
Compare
@totten I changed that comment to a |
I'll give one last bit of |
Overview
This allows the extension upgrade to proceed without error, even if there are missing dependencies.
The user will be prompted to install the missing dependencies afterward, e.g. #22464
See https://lab.civicrm.org/dev/core/-/issues/3036
Before
All dependencies would be added to the upgrade queue and then the extension upgrader would try and fail to upgrade them even if they were missing.
After
Upgrading dependencies is skipped.
Technical Details
Maybe I'm missing something, but that
while
loop with the tracking variables and thearray_shift()
seemed overcomplicated. I had to read it a couple times to figure out that all it does is iterate through each item once. That can be more simply achieved with aforeach
loop, so I changed it to that.