From @alexpott in #3283900-6: Define recipe runtime configuration update requirements β . When we apply or reapply a recipe:
what is happening at the moment is that if the configuration doesn't exist all good... we can let the recipe create it. If the configuration does exist that we'll do a comparison (after removing the UUID, _core and dependencies) if the config matches then we'll allow the recipe to be applied - if not then we throw an exception - see https://git.drupalcode.org/project/distributions_recipes/-/blob/10.0.x/c... - yes we can probably improve how this comparison is done but it is working nicely atm and tested.
The introduction of config actions means this approach is no longer sufficient. This is true because config actions modify config as provided. For example, a user role provided by a recipe is designed to be used in many recipes and modified by each through config actions that add permissions. We're seeing this in the work in #3301370: Model core's standard install profile as recipes β . Many recipes run a basic recipe that installs the "content editor" role and then apply actions that add permissions to that role. Under the current approach, the second recipe to do so will trigger an exception, since the role config as provided won't match the config in the active storage.
Instead, we need to compare against a snapshot of the config as installed and altered through config actions.
Create three recipes:
editor_role
that provides an "editor" user rolearticle_content_type
that applies editor_role
and provides a config action that adds permissions to the role installed by editor_role
page_content_type
that (like article_content_type
) applies editor_role
and provides a config action that adds permissions to the role installed by editor_role
.Apply article_content_type
.
Apply page_content_type
. Result: exception is thrown because "editor" user role as provided doesn't match user role as saved to the active config storage, which has config actions applied.
Active
11.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.