Problem
Distribution Update expects configuration names to start with extension name, although the core documentation says, this is not required.
I am referring to this article: https://www.drupal.org/docs/develop/coding-standards/configuration-file-...
In the section "Simple configuration" the documentation says "Usually, the choice of name is (extension).settings for the unique configuration name, but this is not required."
If you do not choose this pattern, distribution update refuses to update, no matter if you want to update this special module or any other.
My colleagues and me recognized this behaviour when we renamed a module and forgot to rename the corresponding configuration, too. Even after a fresh reinstall and a just-for-test configuration change in a different module, the distribution update was unable to perform the updates.
Example:
module_a contains configuration module_a.settings
module_b contains configuration module_b.settings
Now you rename module_a to module_a2 but do NOT rename module_a.settings to module_a2.settings
After that you change anything in configurations file for module_b.settings.
In the following Distribution Update will say: "The configuration cannot be imported becauce it failed validation for the following reason: Configuration module_a.settings depends on the module_a extension that will not be installed after import"
If you change the configuration name to module_a2.settings afterwards, everything works as expected.
Conclusion
For distribution update, the first part of the configuration name has to be the extension name! The official documention about this topic tells a different story.
Proposed resolution
Do not deduce the extension/module from the configuration name OR reduce the corresponding error to a warning
Comments
Comment #2
geek-merlinIf i get this right, this will break update of config/optional amongst others.
Comment #3
bircherThis is not a problem with config_distro but with the documentation of drupal core (ie the one you linked to.)
While it is technically not required for a running drupal site it is required for synchronizing the configuration. (ie the config you have will not work when you download the tarball and upload it again, even on the same site instance.)
Config Distro imports the configuration and with that does all the validation so this is an expected behaviour.
Comment #4
jocowoodThank you for the clarification!
I opened up a related issue in the drupal core documentation category:
https://www.drupal.org/project/drupal/issues/3080782