Problem/Motivation

In talking with @spiderman, we thought about being able to work with Recipe configuration via Config Enforce. It might also make sense for some config enforce modules to be recipes instead.

Being able to export config to recipes, and enforce recipe configs seems like it would be very useful.

In particular, I'm new to the Recipes ecosystem but I'm not aware of tools other than things like Ratatouille to make it easier to export config YAML files into recipes. The docs just talk about copying config files over manually.

Proposed resolution

Support recipes as "target modules". Allow exporting to recipes and enforcing recipe configs.

Remaining tasks

  • Test if config_devel can export to recipes (may be a blocker)
  • Allow creating recipes via Config Enforce Devel UI
  • Allow adding recipes as target modules
  • ...

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Comments

star-szr created an issue. See original summary.

star-szr’s picture

Issue summary: View changes
star-szr’s picture

Took a quick look and there is nothing like a recipe discovery class in core. I then found #3446354: Create a simple class to allow discovering recipes in the file system.

Bit of a sidenote, but on a project we have played around with splitting recipes into contrib and custom, and while this mostly works as expected, it seems we may be going against convention based on #3539469: Document why recipes all need to be in the same directory and the code at #3446354: Create a simple class to allow discovering recipes in the file system (it doesn't descend into subdirectories). I'm not sure what a developer is expected to do - for VCS purposes there needs to be a way to distinguish the two types of recipes.

star-szr’s picture

Status: Active » Closed (won't fix)

In light of #3539469-3: Document why recipes all need to be in the same directory:

The thing about a recipe, in general, is that you're not supposed to keep them around the way you do with modules and themes. The unpacking plugin underscores this point. You should require a recipe, apply it, and then just delete it.

I'm thinking supporting recipes as targets is not really the right path. While it may be possible, it doesn't seem worthwhile.

Probably more useful would be a tool (drush command) that could convert the config parts of a recipe into a config_enforce target module, or perhaps add to an existing config_enforce target module.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.