Problem/Motivation

Parallel issue on Configuration Provider: #2989625: Optionally normalize config on read in provider storage to faciliate comparison.

Configuration Snapshot is used in Configuration Synchronizer to determine available updates based on comparison to a configuration snapshot.

Differences in config key or value ordering can produce what are essentially spurious differences--the config has not changed, but ordering is different. One factor that can produce differences in ordering is the presence of configuration alters through for example Config Actions Provider.

Proposed resolution

There are two points we could normalize at: read or write. Read is preferable, in that we aren't changing the actual data as stored, only as read. However, since it's a common config workflow to read, alter, and then write, read differences would make their way anyway into the data as saved. So normalization should be optional.

There's a relevant method in Configuration Update Manager, \Drupal\config_update\ConfigDiffer\normalizeArray(). We can't use it directly since it's a protected class method.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

nedjo created an issue. See original summary.

nedjo’s picture

Project: Configuration Snapshot » Config Snapshot
Version: » 8.x-1.x-dev

  • nedjo committed 82189db on 8.x-1.x
    Issue #2989987 by nedjo: Optionally normalize config on read in snapshot...
nedjo’s picture

Status: Active » Fixed
Related issues: +#2992699: Ordering differences trigger spurious changelists

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.