Fix duplicate default merge array values
What does this merge request do and why?
In main
branch, if I set a GDK config with gdk config set <key> <value>
, this line gets added, even if it already exists.
Questions
- Should it get added if it doesn't exist but I've specified a user-defined array value? In this MR, it still gets added. That seems a bit user-hostile.
- Furthermore, what if you set an Array config to empty, because you just don't want the default?
A way to resolve both questions: If a value is so fundamentally important, maybe it should be implied, and not added to gdk.yml
.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Before
➜ gdk git:(main) gdk config get gdk.update_hooks.before
support/exec-cd gitlab bin/spring stop || true
support/exec-cd gitlab bin/spring stop || true
rake gitlab:truncate_logs
➜ gdk git:(main) gdk config get gdk.update_hooks.before
support/exec-cd gitlab bin/spring stop || true
support/exec-cd gitlab bin/spring stop || true
rake gitlab:truncate_logs
➜ gdk git:(main) gdk config set webpack.incremental true
✅️ 'webpack.incremental' is now set to 'true' (previously 'false').
ℹ️ A backup of 'gdk.yml' has been made at '.backups/gdk.yml.20230413004218'.
ℹ️ Don't forget to run 'gdk reconfigure'.
➜ gdk git:(main) gdk config get gdk.update_hooks.before
support/exec-cd gitlab bin/spring stop || true
support/exec-cd gitlab bin/spring stop || true
support/exec-cd gitlab bin/spring stop || true
rake gitlab:truncate_logs
➜ gdk git:(main) gdk config set webpack.incremental false
✅️ 'webpack.incremental' is now set to 'false' (previously 'true').
ℹ️ A backup of 'gdk.yml' has been made at '.backups/gdk.yml.20230413004230'.
ℹ️ Don't forget to run 'gdk reconfigure'.
➜ gdk git:(main) gdk config get gdk.update_hooks.before
support/exec-cd gitlab bin/spring stop || true
support/exec-cd gitlab bin/spring stop || true
support/exec-cd gitlab bin/spring stop || true
support/exec-cd gitlab bin/spring stop || true
rake gitlab:truncate_logs
After
➜ gdk git:(main) gco mk/fix-duplicate-default-merge-arrays
Switched to branch 'mk/fix-duplicate-default-merge-arrays'
Your branch is up to date with 'origin/mk/fix-duplicate-default-merge-arrays'.
➜ gdk git:(mk/fix-duplicate-default-merge-arrays) echo "Manually deleting the excess array values..."
Manually deleting the excess array values...
➜ gdk git:(mk/fix-duplicate-default-merge-arrays) gdk config get gdk.update_hooks.before
support/exec-cd gitlab bin/spring stop || true
rake gitlab:truncate_logs
➜ gdk git:(mk/fix-duplicate-default-merge-arrays) gdk config set webpack.incremental true
✅️ 'webpack.incremental' is now set to 'true' (previously 'false').
ℹ️ A backup of 'gdk.yml' has been made at '.backups/gdk.yml.20230413004351'.
ℹ️ Don't forget to run 'gdk reconfigure'.
➜ gdk git:(mk/fix-duplicate-default-merge-arrays) gdk config get gdk.update_hooks.before
support/exec-cd gitlab bin/spring stop || true
rake gitlab:truncate_logs
➜ gdk git:(mk/fix-duplicate-default-merge-arrays) gdk config set webpack.incremental false
✅️ 'webpack.incremental' is now set to 'false' (previously 'true').
ℹ️ A backup of 'gdk.yml' has been made at '.backups/gdk.yml.20230413004359'.
ℹ️ Don't forget to run 'gdk reconfigure'.
➜ gdk git:(mk/fix-duplicate-default-merge-arrays) gdk config get gdk.update_hooks.before
support/exec-cd gitlab bin/spring stop || true
rake gitlab:truncate_logs
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Merge request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. - [-] Tests added for new functionality. If not, please raise an issue to follow-up.
- [-] Documentation added/updated, if needed.
- [-] Announcement added, if change is notable.
- [-]
gdk doctor
test added, if needed. - [-] Add the
~highlight
label if this MR should be included in theCHANGELOG.md
.