logo

Tech Stacks - Source Control

Source Control: git / hg / jj

Modern code repos usually live in either git or Mercurial (hg). jj is a new player written in Rust.

Gitlab

Persistent storage for the stateful components:

  • PostgreSQL (GitLab data)
  • Redis (session data)
  • Gitaly (git repo data): Git RPC service for handling all Git calls made by GitLab. Requests => Gitaly => .git repos.
    • Before Gitaly: all requests direct calls to .git directory stored on NFS mounts connected to the GitLab server. Gitaly removed direct access to the .git directory.
  • GitLab Shell: handles git SSH sessions for GitLab and modifies the list of authorized keys. GitLab Shell is not a Unix shell. GitLab Shell is used for tasks such as for git clone, git push etc executed via SSH.

https://docs.gitlab.com/ee/development/architecture.html

In k8s, a gitlab deployed in the admin cluster can be used for IaC.

Code repo structure

  • single repo or not?
  • single branch or not?

Code Search

You probably need a good way to search and browse your code. E.g. git itself manages the code, while GitHub provides a good UI to view the code.

Code Review

Gerrit (https://www.gerritcodereview.com/) is a widely used code review tool. Originated from Google, and now also being used for Google's git repos.