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.
- git
- https://www.git-scm.com/
- written in C
- Google stores most of its code in its own system ("Piper"), but some Android, Chrome, Cloud related repos live in
git.
- hg
- https://www.mercurial-scm.org/
- written in Python
- better support for larger repos.
- used by Facebook
- jj
- https://github.com/jj-vcs/jj
- 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 =>
.gitrepos.- Before Gitaly: all requests direct calls to
.gitdirectory stored on NFS mounts connected to the GitLab server. Gitaly removed direct access to the.gitdirectory.
- Before Gitaly: all requests direct calls to
- 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 pushetc 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.