Optionally delete config entities when they're deleted from code

Created on 6 October 2017, over 7 years ago
Updated 18 October 2024, 3 months ago

Problem/Motivation

Currently, it config entities won't be removed when they are removed in code.

For example, you have a profile with a block configuration that places a block in a particular region. The code removes that piece of configuration, because the latest version doesn't place that block any more. Ideally config_sync could detect that and remove it from active config.

We use configuration changelist data. Currently we're only using the 'update' and 'create' items. Support for deletions was intentionally left out support because of the cascading impacts of deleting configuration items.

Proposed resolution

This required #2800321: Allow limiting updates by extension .

  • Add a new configuration parameter to SyncFilter plugins: the list of supported operations. Defaults to ['update', 'create'].
  • On the screen for importing updates, for each module for each operation, provide a checkbox.
  • On submit, alter the plugin configuration accordingly.

And make a corresponding change to the ConfigSyncLister.

See @todo code comment re removing an early return in ConfigSyncLister::getExtensionChangelist()

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇺🇸United States dsnopek USA

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.

  • 🇲🇩Moldova Spurlos Chisinau

    I encountered this issue while actively developing a custom distribution. Even in a development environment, where we frequently reorganize things and delete irrelevant or incorrect configurations from features, we're somewhat blocked and have to write hook updates to manually delete configurations. It would be really helpful if config_sync could facilitate configuration deletion, similar to how it handles creation and updates—at least in a destructive manner without dependency checks, leaving that responsibility to developers for testing.

Production build 0.71.5 2024