[PP-2] After a recipe is successfully applied, validate all of the config that was imported or modified by config actions

Created on 15 November 2023, over 1 year ago

Problem/Motivation

This is spun off from Wim's note in #3390919: [PP-2] If a recipe fails to apply due to config validation errors, revert the site's config to its original state โ†’ (specifically, https://git.drupalcode.org/project/distributions_recipes/-/merge_request...):

when we add validation that reaches out of the validated config object (we have an example of that already in Drupal core: RequiredConfigDependenciesConstraintValidator), and into other config objects, we will need to validate again after all config entities are imported and after the config actions have been applied.

That's a really good point. Validation that reaches outside of a single config object/entity is definitely a thing, and can only really be properly done once the recipe has been successfully applied.

This is blocked by #3401867: Validate config that gets imported from modules or the recipe's config directory โ†’ and #3401723: [PP-1] Config modified by action plugins should be validated before it is saved โ†’ .

Proposed resolution

Once all of a recipe's config has been imported, and its config actions have run, re-validate every config object or entity was added or modified by the recipe. If there are any violations, an exception should be thrown and the config should be reverted to its original state (the ability to revert will be added in #3390919: [PP-2] If a recipe fails to apply due to config validation errors, revert the site's config to its original state โ†’ ).

User interface changes

Probably none.

API changes

Unclear as yet, but probable.

Data model changes

Uncertain, but shouldn't be needed.

๐Ÿ“Œ Task
Status

Postponed

Version

10.2

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024