Skip to content

Remove rugged wrappers in Gitaly

Quang-Minh Nguyen requested to merge qmnguyen0711/remove-rugged-in-gitaly into master

A follow-up of !4954 (merged)

At this point, Gitaly only serves two functions:

  • FindLicense that detects the license of a particular repository. This function is powered by 'licensee' gem, and served with a gRPC server started by ruby sidecar.
  • gitaly-linguist that detects the languages used in a repository. Gitaly sever shells out ruby/bin/gitaly-linguist and parses the result.

Apart from them, ruby sidecar doesn't serve anything else. In Ruby code base, we still have plenty of abandoned classes and helper methods. Most of them are to wrap around Rugged. We are quite certain that they are not used anymore. It's time to clean them up. In details:

  • Remove HooksService and OperationService
  • Remove ruby/lib/gitlab/git/*. Those classes wrap around rugged data and provide some advanced sugar-coating methods.
  • Remove FeatureFlags
  • Remove RuggedInterceptor
  • Remove redundant supporting methods such as StrongMemoize or logger classes.
  • Clean up configurations

After cleaning up, the file structure of ruby sidecar looks like the following:

Screenshot_2022-10-31_at_15.04.35

As Rugged is still used internally by licensee and linguist gems, we can't remove rugged completely. We can't remove some configurations passed from Gitaly, either. Both of them will go away in 📜 Implement license detection in Gitaly in Go (&7874 - closed) and 🌐 Replace github-linguist with go-enry (&8526 - closed).

Edited by Quang-Minh Nguyen

Merge request reports