The target storage in the StorageComparer can get out-of-sync with the container during installation from config

Created on 5 July 2022, over 2 years ago
Updated 9 April 2024, 9 months ago

Problem/Motivation

Sometimes during config import the target storage in the StorageComparer can get out-of-sync with the container's config.storage service that is used to create it.

This results in incorrect configuration being written to the config snapshot because the data in the config.storage service is wrong.

Steps to reproduce

  1. Install minimal
  2. Enable the locale module
  3. Add the german language to the site
  4. Export configuration
  5. Install the site from configuration (drush si --existing-config)

You will see:

 [notice] Missing required data for configuration: core.entity_form_mode.user.register
 [notice] Missing required data for configuration: filter.format.plain_text
 [notice] Missing required data for configuration: language.entity.en
 [notice] Missing required data for configuration: language.entity.und
 [notice] Missing required data for configuration: language.entity.zxx
 [notice] Missing required data for configuration: user.role.anonymous
 [notice] Missing required data for configuration: user.role.authenticated
 [notice] Missing required data for configuration: user.settings

in the drush output,

Proposed resolution

We can either clear the cached storage after config import or we need to reinject the storage comparer too. Neither solutions feels 100% perfect because ConfigImporter reinjection only occurs during a module install and there are other reasons a container can get rebuilt. For example, more than 1 language can be created.

Remaining tasks

User interface changes

None

API changes

TBD

Data model changes

None

Release notes snippet

TBD

πŸ› Bug report
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
ConfigurationΒ  β†’

Last updated about 17 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024