Still warn but update gdk.yml if value the same
What does this merge request do and why?
This MR updates the gdk config set <key> <value> logic to update the gdk.yml even if the value is already set. The reason for this change is that for Gitpod, we
How to set up and validate locally
In your <GDK_ROOT> in the main branch:
-
Run
ruby -r yaml -e "puts (YAML.load_file('gdk.yml') || nil)&.dig('webpack', 'host') || 'unset'"and ensureunsetis returned. This shows thewebpack.hostvalue is currently not stored in yourgdk.yml. -
Run
bin/gdk config set webpack.host 127.0.0.1and ensure you see:⚠️ WARNING: 'webpack.host' is already set to '127.0.0.1' -
Re-run
ruby -r yaml -e "puts (YAML.load_file('gdk.yml') || nil)&.dig('webpack', 'host') || 'unset'"and ensureunsetis returned. This shows thewebpack.hostvalue was not stored in yourgdk.yml. -
Check out this branch -
1652-support-gdk-config-set-force-2 -
Run
bin/gdk config set webpack.host 127.0.0.1and ensure you see:✅️ 'webpack.host' is now set to '127.0.0.1' (explicitly setting value '127.0.0.1'). ℹ️ A backup of 'gdk.yml' has been made at '.backups/gdk.yml.<TIMESTAMP>'. ℹ️ Don't forget to run 'gdk reconfigure'. -
Re-run
ruby -r yaml -e "puts (YAML.load_file('gdk.yml') || nil)&.dig('webpack', 'host') || 'unset'"and ensure127.0.0.1is returned. -
Re-run
bin/gdk config set webpack.host 127.0.0.1and ensure you see:⚠️ WARNING: 'webpack.host' is already set to '127.0.0.1' -
You can also run
cat gdk.ymland manually inspect the changes to confirm.
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 doctortest added, if needed. -
Add the ~highlightlabel if this MR should be included in theCHANGELOG.md.
Closes #1652 (closed)