-
-
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
dev/core#3119 - Post-upgrade messages no longer being displayed #22985
Conversation
(Standard links)
|
This line is only hit if the upgrader activates CiviGrant.
The main call(s) to `rebuildMenuAndCaches()` do clear out most caches. It's _just_ the session that has been skipped.
792eb3a
to
efea3f5
Compare
Tested on D7, upgrading from v5.45=>5.48 (with+without patch). It initially didn't work for me. With some tracing, found the problem was that #22881 had touched another call to Pushed up a small fix for that (a181232).
(1) The (2) Yeah, I also noticed that (after the previous fix) it felt like the upgrade progress-bar moved slower (adding an extra/long step at the end). But I rationalized this as two things:
Anywho, I think it's good to go based on Flagging |
@@ -840,6 +841,8 @@ public static function doCoreFinish(): bool { | |||
* @return bool | |||
*/ | |||
public static function doFinish(): bool { | |||
$session = CRM_Core_Session::singleton(); | |||
$session->reset(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this makes sense and is better. I didn't actually look at what config->cleanupCaches does just copied from rebuildMenuAndCaches.
@@ -195,7 +195,9 @@ public static function enableExtension(CRM_Queue_TaskContext $ctx, array $keys): | |||
// Note: A good test-scenario is to install 5.45; enable logging and CiviGrant; disable searchkit+afform; then upgrade to 5.47. | |||
$schema = new CRM_Logging_Schema(); | |||
$schema->fixSchemaDifferences(); | |||
CRM_Core_Invoke::rebuildMenuAndCaches(FALSE, TRUE); | |||
|
|||
CRM_Core_Invoke::rebuildMenuAndCaches(FALSE, FALSE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, civigrant - the thing this was all about.
The test fail makes no sense, but there's been something at least a little weird with jenkins for a few days. It sounds like it's being worked on.
|
Thanks for the feedback @demeritcowboy. Agree about the test-failure - doesn't seem to be related. Merging. |
Overview
https://lab.civicrm.org/dev/core/-/issues/3119
Before
Note there isn't even the "Congratulations" message which is always present.
After
Technical Details
In #22881 (in 5.47) the session clear got moved so that it now happens before it gets to the line where it retrieves session variables telling it that it's in upgrade mode and where to find the post-upgrade messages.
Comments
Doesn't affect
cv
, just the UI.This does add yet another cache clear which slows down upgrades a bit. Previous additional cache clearing had already made it take longer than it used to. But anecdotally it seems common that people need to do additional cache clears anyway.