Fix vault:reconfigure fails running vault commands
What does this merge request do and why?
This MR fixes that the rake command vault:reconfigure
errors with the following shellout error:
rake aborted!
TypeError: no implicit conversion of Hash into String (TypeError)
pid = spawn(*cmd, opts)
^^^^^^^^^^
/Users/kev/development/gitlab/gitlab-development-kit/lib/shellout.rb:74:in `stream'
/Users/kev/development/gitlab/gitlab-development-kit/lib/shellout.rb:35:in `block in execute'
/Users/kev/development/gitlab/gitlab-development-kit/lib/shellout.rb:34:in `execute'
/Users/kev/development/gitlab/gitlab-development-kit/lib/gdk/vault.rb:67:in `shellout'
/Users/kev/development/gitlab/gitlab-development-kit/lib/gdk/vault.rb:11:in `create_test_secret'
/Users/kev/development/gitlab/gitlab-development-kit/lib/tasks/vault.rake:11:in `block (2 levels) in <top (required)>'
/Users/kev/.local/share/mise/installs/ruby/3.2.3/bin/bundle:25:in `load'
/Users/kev/.local/share/mise/installs/ruby/3.2.3/bin/bundle:25:in `<main>'
Tasks: TOP => vault:configure
(See full trace by running task with --trace)
How to set up and validate locally
- Run
gdk config set vault.enabled true
- Run
gdk reconfigure
- Run the
vault:configure
rake as per the docs indoc/howto/hashicorp_vault.md
- See that the
vault
commands are executed instead of the error above
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
.