Related to #2316909: Revisit all built-in test/default views configuration in core & #1938580: [META] Make active config save format match the default yml file (order and quotes)
Problem/Motivation
We have 140+ default/test views in core with configurations created by UI/hand and #2316909: Revisit all built-in test/default views configuration in core trying to regenerate them to update with new configuration structure changes. However this process is going to be a day-to-day task for the module maintainers/module that provides any configuration. The core configuration sync is more of focus on "updating one site's configuration to various environments". This process doesn't help individual module maintainer.
@alexpott created a script which refreshes the configurations. Because there is no order saving configuration, the configuration getting saved in random order on every refresh.
Proposed resolution
Fix the configuration order on save, so that it will follow some order.
Remaining tasks
Discuss
Patch
Test with @alexpott script.
User interface changes
N/A
API changes
N/A
Comments
Comment #1
YesCT CreditAttribution: YesCT commentedComment #2
vijaycs85It looks like we have another proposal to achieve this very same goal using configuration schema at #2361539: Config export key order is not predictable for sequences, add orderby property to config schema . However I'm not very sure why this order need to be controlled by configuration schema or any other component for this matter. All we need is a common ordering. It doesn't really need to have option to manage/controlled.
Once we decide the solution we can close either this issue or #2361539: Config export key order is not predictable for sequences, add orderby property to config schema
Comment #3
Gábor Hojtsy@vijaycs85: we need some way to order the elements, because otherwise they may randomly change order and produce diffs that look like changes but they are still the same file. If you randomly swap the order of the top level keys of a config file, it is still the same configuration data for a machine, nothing changed in the meaning of the file. But for a human to review the deployment diff it will be extremely hard. What other control would you use other than configuration schema?
Comment #4
BerdirAFAIK we already do this for top-level config entity keys, as they are added to the array in the order they are defined in the schema by default.
Comment #5
tkoleary CreditAttribution: tkoleary at Acquia commentedAdded to config management usability meta #2642404: [meta] Usability improvements to configuration management post 8.0
Comment #6
xjmComment #10
alexpottI'm going to mark this issue a duplicate of #2361539: Config export key order is not predictable for sequences, add orderby property to config schema and #2852557: Config export key order is not predictable, use config schema to order keys for maps