Clean up active configuration from alpha/beta versions

Created on 25 October 2024, about 1 month ago

Problem/Motivation

We should have clean configuration and clean code.

We are not using 'region' anymore since 3.0.0 and not using 'hidden' anymore since beta3 or so.

There is lingering code for working around the unused "hidden" property that is now completely unused, which means nothing to anyone. We shouldn't have meaningless backward compatibility code accumulate if not necessary.

Proposed resolution

* Clean up config files

* Remove "region" and "hidden" from active config

* Remove backward compatibility code

Note this is differs from 🐛 Clean up CE display settings on save (or earlier) Active in the sense that I don't know what to do with those unused "dynamic-per-formatter" properties yet. The properties in this issue are straightforward to clean up and will never be seen again.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

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

Merge Requests

Comments & Activities

  • Issue created by @roderik
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
  • Merge request !103Clean up configuration from beta versions → (Merged) created by roderik
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    I've tested the update hook well, while updating config from our internal project.

    @fago I want to do this, but.... since we have been "ping-ponging " several times already about the code change in EntityCeDisplay, I didn't want to commit this without you seeing that particular change.

    With this MR, the "hidden: null" value is really truly gone, so it cannot cause errors anymore. (It can only cause errors as long as you update this code without having run the update hook yet.)

    -----

    Just some random details for documentation:

    Behavior that has confused me for a long time already / what I learned:

    • After the update hook runs, active configuration holds no "region" or "hidden" values anymore,
    • BUT... a "drush config-export" will still write those values into new files in an empty config/sync directory! (Until you change a 'real' value in the config entity.) Reason:
      • It uses some temporary file storage internally, which is not updated until you actually change a value
      • Before exporting, the active configuration is compared with the temporary storage
      • Since (because of the config schema) no "real" differences are found... the temporary storage (which still contains "hidden: null" etc) is used for exporting!
    • There is no good accessible method to access/clear this temporary storage, so I'm leaving it alone.
    • If those files (containing "region" and "hidden: null" are re-imported, these values do not end up in active storage; they are filtered out (because of the config schema). So there's no risk of bugs there.
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    I've tested the update hook well, while updating config from our internal project.

    I've now also tested several integration test runs (i.e. browser tests etc) with this changed code in place.

  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
  • Pipeline finished with Skipped
    19 days ago
    #339370
  • First commit to issue fork.
    • fago committed 100f141f on 3.x authored by roderik
      Issue #3483458 by roderik: Clean up active configuration from alpha/beta...
  • 🇦🇹Austria fago Vienna
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024