Review recipe implications for PreExistingConfigException

Created on 1 June 2022, over 2 years ago
Updated 2 September 2024, 4 months ago

Problem/Motivation

Two extensions may provide a config item of the same type and name. Currently, PreExistingConfigException prevents those modules from both being installed on the same site. With recipes, there may be edge cases where special handling is needed. TBD: is this just an implementation detail, in which case we don't need to worry about it at this point, or might it require any change to the recipe format?

Steps to reproduce

Scenario 1: Re-provide the same config item. PreExistingConfigException should not be triggered.

  • Module A provides config item W.
  • Recipe A installs Module A and config item W.
  • Later, recipe B installs Module A and config item W.

Scenario 2: Provide a conflicting config item. PreExistingConfigException should be triggered.

  • Module A and Module B both provide config item W--same type and name.
  • Recipe A installs Module A and config item W.
  • Recipe B installs Module B and config item W.

Proposed resolution

An implementation detail could be: config items are installed only from extensions that a recipe explicitly installs. In scenario 2, that would clarify which of the two versions of item W should be installed. But does that help determine whether a PreExistingConfigException should be triggered?

Or should a recipe specify the extension that a particular config item is installed from?

Should we store a list of config items previously installed via recipes and the extension that provided them?

Or is scenario 1 just not supported?

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Closed: outdated

Version

11.0

Component

Documentation

Created by

πŸ‡¨πŸ‡¦Canada nedjo

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

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