Problem/Motivation
If you have a project that contains config/modify folders and enable the module later then the module will immediately try to apply the changes in those folders. However, that is likely config that was already available through other paths (e.g. config updates) or requires future update hooks to be applied which can cause fatal errors.
Steps to reproduce
Proposed resolution
Add the config/modify files of all modules that are enabled when config_modify is enabled to the list of applied configs without applying them. This ensures that only files that are added (or enabled) after the config_modify module exists will be applied.
This means that if a module relies on using config_modify to make alterations to config it needs to add the module as a dependency so the config_modify module will be installed first.
We have the option to only register config as applied if its dependencies matches, but at the moment this may make things less predictable so we just register all the config as already being applied, requiring modules to have a proper install order to fix this issue.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | config_modify-install-race-condition-3357929-7.patch | 10.66 KB | kingdutch |
Comments
Comment #2
kingdutchComment #3
kingdutchThe previous patch didn't actually fix the problem because we didn't fix our initial conditions.
Comment #5
kingdutchNeed to slightly better control the install order.
Comment #6
kingdutchThis new version provides a Drush command to also fix the issue during update hooks.
Comment #7
kingdutchThis adds test coverage specifically for the install case.
Comment #9
kingdutch