-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
drush updb does not clear caches if there are no post updates #4494
Comments
I think we should add an else to |
It is possible that this only affects drush 9, #4103 might have fixed this too, I did check the code in drush 10 but didn't look in the right place, would have assumed that cache clear to happen in the same way as the other one that we do between. |
To mimic core updates via the UI there must be cache clear when running updatedb - even if there are no updates. Core does a flush at the end of the batch and prior to running post updates (if there are any). |
We've been back and forth on this :). To make matters more complex, we now have the |
I can confirm on the latest Drush 10 that with no updates to run, there is no cache rebuild like what happens with update.php. |
Actually it looks like the new deploy command has the same problem:
Yes, there's an explicit cache rebuild after updatedb, but that's not the problem here. The problem is that there's no explicit cache rebuild happening within updatedb before the post_update hooks are run if there were no hook_update_N calls. I agree this should mirror core as much as possible. |
@bkosborne fwiw it is kind of moot because updatedb runs prior to post updates without caches - i.e. they are all Null backends. If there are post updates then it is likely that the container will be rebuilt (because the cache key will change) and things will be rebuilt. However I agree that the whole cache clear thing here should be removed for the following reasons:
|
Thanks. Makes sense. I just opened a PR for that #5531 |
Describe the bug
It looks like drush updb was optimized to only run a cache clear between updates and post updates if there are post updates and were updates.
If there are only updates that doesn't seem to happen.
That is becoming a more serious issue due to the Update cache backend that is now in core, that ignores cache writes, and for example the cached config storage only writes to cache and doesn't delete.
To Reproduce
Check value of config with drush cget. Run an update that changes that config value. Check again with drush cget.
Expected behavior
New value is visible.
Actual behavior
The old value is still there.
Workaround
drush cr
System Configuration
Additional information
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: