Installing config modify in an existing project can cause race conditions

Created on 3 May 2023, almost 2 years ago
Updated 3 January 2024, over 1 year ago

Problem/Motivation

If you have a project that contains config/modify folders and enable the module later then the module will immediately try to apply the changes in those folders. However, that is likely config that was already available through other paths (e.g. config updates) or requires future update hooks to be applied which can cause fatal errors.

Steps to reproduce

Proposed resolution

Add the config/modify files of all modules that are enabled when config_modify is enabled to the list of applied configs without applying them. This ensures that only files that are added (or enabled) after the config_modify module exists will be applied.

This means that if a module relies on using config_modify to make alterations to config it needs to add the module as a dependency so the config_modify module will be installed first.

We have the option to only register config as applied if its dependencies matches, but at the moment this may make things less predictable so we just register all the config as already being applied, requiring modules to have a proper install order to fix this issue.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇳🇱Netherlands kingdutch

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

Comments & Activities

Production build 0.71.5 2024