Skip to content

Remove ruby as a test, build, or install dependency

Right now, we have two scripts in gitlab-shell that use Ruby: bin/compile and bin/install. Once #173 (closed) is completed, ruby will no longer be a run-time dependency, and it is inefficient and confusing to need Ruby at these earlier stages.

We should remove or rewrite these dependencies such that both scripts work to completion in a basic golang:latest container without Ruby installed.

Ideally, we'd remove bin/install entirely, but it's responsible for creating at least one directory that needs to exist on the SSH nodes, and we'll need to ensure that responsibility exists elsewhere - e.g. in omnibus, GDK, CNG, and the install-from-source docs - before we remove it. One possibility is to make https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/authorized_keys.rb create the directory as well as the authorized_keys file if it doesn't exist - that should be safe.

bin/compile can be subsumed entirely into the Makefile. This will be a much simpler operation once the Golang code has moved from gitlab-shell/go as its top-level.

Before we can remove Ruby entirely, we also need to replace some integration specs that are written in Ruby, per the closing comments in !338 (closed) . An alternative to blindly reimplementing them in Go might be to ensure we have test coverage in gitlab-qa and implement #180 instead.

Edited by Nick Thomas