Active
Project:
Drupal core
Version:
main
Component:
extension system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2020 at 17:42 UTC
Updated:
13 Apr 2023 at 16:40 UTC
Jump to comment: Most recent
Follow-up from #3120910: Sites with missing schema information can't update to 8.8.3+ - attempts to run all historical updates, which is a second attempt to fix the symptoms of this problem. As yet we've not identified what the cause might be.
There are two cases:
1. Module is installed, but nothing is recorded in system.schema
2. Module is uninstalled, but has something recorded in system.schema
So far no one has steps to reproduce either bug.
However, with #2 it seems likely this could be due to a force uninstall - i.e. removing the module from extension.list without actually uninstalling it.
Comments
Comment #2
longwaveComment #3
catchJust seen #3136668: Invalid system.schema key_value entry causes fatal on updating to 8.8.5 - which is about orphaned, as opposed to missing, system.schema information, but let's track them together for now until we have an idea of how this is getting out of sync.
Comment #4
andypostComment #5
andypostComment #6
martin107 commentedCan I ask for a bit more context as to what "gets out of sync" means
I see #3
Even vague recollections of the bug would be useful in mapping 'missing system.schema information' to "write path failures" or "read path failures".
In terms of broad-scoped behat tests this is what I mean.
The read path test:-
When the database table 'key-value' rows are set like so .. then when I visit '/admin/modules' I should see x, y, z
The write path tests:-
When I visit '/admin/modules' and click here. here and here .. then the tables should look like a, b, c
From that quote missing 'system.schema information' looks like a write path failure.
But was access through drush, or the 'admin/modules' page
This might be useful as the admin/modules controller always reads the state of the modules with a little reset() thrown in
If the bug report said "All I know is that we are seeing random tests failures" .. that would also be valid and I would approach the problem differently.
Comment #7
catchUpdated the issue summary a bit.
Comment #9
andypostI used to reproduce kind of it with
ActionConfigTestafter removal of cachable call indrupal_load_updates()todrupal_get_installed_schema_version(NULL, FALSE, TRUE)with new service #2124069-288: Convert schema.inc to the update.update_hook_registry service (UpdateHookRegistry)It allowed to catch that tests should write initial schema, so maybe when module enabled via config install it does not write schema update
Comment #10
alexpottOne way for things to get out of sync is for the container rebuild during
to throw an exception. I think this can occur quite easily due to broken code or incorrect assumptions made by a module. Is it a silly idea to consider trying to a module install (or unisntall) inside a database transaction - and therefore if anything goes wrong we can rollback?
Comment #11
andypostAnother case is from config-slack - it's often used
$settings['config_exclude_modules'] = ['devel', 'stage_file_proxy'];but I found no "schema changes" in config transformationsComment #12
alexpott@andypost I'm not sure about #11. It's not working the way you think it is. If the site already has devel installed on it that adding that to config_exclude_modules is not going to uninstall it.
Comment #15
stephencamilo commentedComment #16
hestenetReset issue status.
Comment #18
bhanu951 commentedComment #19
geek-merlinModule install not being atomic can also lead to "Cannot update database because 'module is too old'".
See #3206215-11: "The installed version of the <Module> module is too old to update" makes no sense to site administrators.