Avoid spurious updates to UUID in `system.site`

Created on 14 August 2023, 11 months ago

Problem/Motivation

system.site includes the UUID for the site. This changes on every installation, and ends up as noise in commits. We already try to preserve the current UUID in ConfigImporter::handleSpecialCaseConfig(). IMO, we should remove the uuid key from the exported system.site.yml altogether.

Steps to reproduce

(going from memory here, so YMMV)

  1. Install a site
  2. Enforce system.site
  3. Stage the system.site.yml file, along with the target module's registry
  4. Re-install the site.
  5. Navigate to /admin/config/system/site-information
  6. Save the form
  7. Run git diff
  8. Observe that system.site.yml (and the module's registry) has changed

Proposed resolution

In EnforcedConfigFile::initialize(), we already have an example of how CED writes config files directly. I suggest that we special-case system.site, similar to how we do in ConfigImporter::handleSpecialCaseConfig().

We may need to introduce a hook_post_auto_export() in config_devel, or perhaps it already provides such an event. Either way, we should then be able to basically overwrite the system.site.yml.

Remaining tasks

Validate the approach; do the thing.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada ergonlogic Montréal, Québec 🇨🇦

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

Comments & Activities

Production build 0.69.0 2024