Problem/Motivation
Configuration provided by install profiles is owned by the site once installation is complete. As such, the site builder is expected to modify the default config and the profile can not assume that config is in a certain state (or that changes to that config are desired). However, profiles that are part of distributions have a need to modify this config after installation throughout the life of the application. The reasons for modifying config fall into two broad categories, each with their own challenges:
- Low level updates like fixing field config
- Optional updates like new features
Low level features have problems like knowing which versions of dependencies are installed and the current state of the existing config. New features suffer from the fact that site builders might not want certain updates or might want part of the update to work with their existing customizations.
Proposed resolution
Several solutions to the optional updates have been developed including:
- https://www.drupal.org/project/config_distro
- https://www.drupal.org/project/config_update
- Lightning's internal tool (
update:lightning)
We should build a consensus around one or a combination of those tools and get some of the more popular distributions to implement it.
Remaining tasks
The resolution to lower level updates is less clear. Work with the config system maintainers to better understand the problem and figure out a path forward.
User interface changes
Most likely a UI for managing config updates provided by distributions. Config Distro does this already.
Comments
Comment #2
kingdutchLinking to CMI 2.0 initiative
Comment #3
mtodor commentedWe also have in Thunder custom module that handles updates (
thunder_updater). It usesconfig_updatein background.We have moved functionality with some improvements from
thunder_updatermodule intoupdate_helper, you can take a look here: https://www.drupal.org/project/update_helper or at https://github.com/BurdaMagazinOrg/module-update_helperThe main idea is that we generate configuration update definition (shortened CUD), what is some kind of patch for configuration and we apply that if the configuration is in the expected state. There is drupal console command that simplify usage for developers to create updates. And in the end, every update is executed over update hook.
That approach works for us, for almost 2 years now.
Comment #4
bojanz commentedWe also have a custom solution in Commerce:
https://github.com/drupalcommerce/commerce/blob/8.x-2.x/src/Config/Confi...
https://github.com/drupalcommerce/commerce/blob/8.x-2.x/src/Config/Confi...