Validation errors applying a recently required recipe without a cache clear

Created on 23 January 2025, 30 days ago

Problem/Motivation

A common error recipe users get is that a dependency of the recipe they just required is not known. A cache clear is often required between composer require and recipe application.

Steps to reproduce

composer require kanopi/saplings-pantheon
drush recipe ../recipes/saplings-pantheon

In RecipeFileException.php line 56:

  Validation errors were found in ../recipes/saplings-pantheon/recipe.yml:
  - [install][0]: "pantheon_advanced_page_cache" is not a known module or the
  me.
  - [install][1]: "redis" is not a known module or theme.

Proposed resolution

Can we clear the cache in the recipe application process so it knows the current state of recipes/modules/themes?

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

recipe system

Created by

πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

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

Comments & Activities

  • Issue created by @thejimbirch
  • πŸ‡¬πŸ‡§United Kingdom catch

    admin/modules has to deal with the same issue that modules might just have been added, and it uses:

       // The module list needs to be reset so that it can re-scan and include
       // any new modules that may have been added directly into the filesystem.
       $modules = $this->moduleExtensionList->reset()->getList();
    

    So probably needs the same thing here.

Production build 0.71.5 2024