Validate that extension listed in the config.import section of recipe.yml has option to bypass all config of that extension

Created on 29 February 2024, 10 months ago
Updated 3 September 2024, 4 months ago

Problem/Motivation

This is spun off from #3400672: Robustly validate the structure of recipe.yml .
In https://git.drupalcode.org/project/distributions_recipes/-/merge_request..., Alex wrote

Hmmmm... this is super super tricky. I'm not sure that tour: ~ means quite what you think it does. If tour provided simple config for example a tour.settings config then this would be created.

Which means that even if we say tour: ~ or dblog: ~, to not import any of the config, dblog.settings will be get imported.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

11.0

Component

Code

Created by

🇮🇳India narendraR Jaipur, India

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @narendraR
  • Status changed to Postponed 10 months ago
  • 🇺🇸United States phenaproxima Massachusetts
  • 🇬🇧United Kingdom alexpott 🇪🇺🌍

    I'm not at all convinced that we need to validate that every module is listed here. I think that not being listed here means that the module's simple config is installed (as it is required) and nothing more is okay.

    I do think that it is worth discussing changing the name from config to config_entities as that's what this is about.

  • Status changed to Active 10 months ago
  • 🇬🇧United Kingdom alexpott 🇪🇺🌍

    I'm not at all convinced that we need to validate that every module is listed here. I think that not being listed here means that the module's simple config is installed (as it is required) and nothing more is okay.

    I do think that it is worth discussing changing the name from config to config_entities as that's what this is about.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Note: the scope of this issue first came up in #3413824: Warn Recipe developers if a module being installed does not have a corresponding config import declaration .

    I do think that it is worth discussing changing the name from config to config_entities as that's what this is about.

    +1! This would go a long way.

    But … I'd still like to try to convince you that we should require config.import for every installed module:

    1. installing a module in Drupal always installs default config — both simple config and config entities
    2. … except in Recipes, only simple config is installed by default
    3. unless you specify import: { some_module: '*' }. This is not obvious.

    It's both for discoverability and explicitness/declarativeness that IMHO config.import.<module name> should be present for every installed module. Because then the validation can inform the Recipe author that they should say which (if any) config entities of the installed module should be installed.

  • 🇮🇳India narendraR Jaipur, India
  • 🇺🇸United States thejimbirch Cape Cod, Massachusetts

    But … I'd still like to try to convince you that we should require config.import for every installed module

    In the last 6 months I think we have educated and documented why recipes don't behave like a regular module install, for recipe author specificity and idempotency.

    I do think that it is worth discussing changing the name from config to config_entities as that's what this is about.

    Do we want to change config to config_entities to add further clarity?

Production build 0.71.5 2024