Skip to content

Draft: Use gdk Bash shim by default (retry)

Ash McKenzie requested to merge ashmckenzie/use-gdk-shim-by-default into main

What does this merge request do and why?

️ This MR is a retry of !2881 (merged) (with minor changes)

Up until now, the 'gdk' command line tool was written in Ruby and has been installed by https://rubygems.org/gems/gitlab-development-kit. Having a Ruby gem provide the 'gdk' command line tool presents challenges when multiple versions of Ruby are in use.

In this MR, we set the gdk.use_bash_shim to true which will create a Bash based shim in /usr/local/bin/gdk that will be used instead of the gdk command line tool installed via the Ruby gem. This will mean that the gdk command line tool will survive Ruby upgrades from now on.

Closes: #1656 (closed)

How to set up and validate locally

  1. Checkout the ashmckenzie/use-gdk-shim-by-default branch

  2. Run:

    cd <GDK_ROOT>
     sudo rm -f /usr/local/bin/gdk                            # sudo is required, unfortunately
    rm -f .cache/.gdk_bootstrapped ; make update reconfigure  # we need to run update reconfigure until https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues/1639 is resolved
  3. Verify the following message and password prompt appears because sudo is required in order to write to /usr/local/bin:

    INFO: Sudo needed to be able to create/update '/usr/local/bin/gdk'
    Password:
  4. Verify the 'gdk Bash shim is now enabled by default' message is rendered.

  5. Verify that /usr/local/bin/gdk now exists.

  6. Run /usr/local/bin/gdk status to ensure it returns expected output.

Impacted categories

The following categories relate to this merge request:

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 the CHANGELOG.md.
Edited by Ash McKenzie

Merge request reports

Loading