Monolithic repositories, more commonly known as monorepos, are a software development approach where code for many projects is stored in a single repository.
Monorepos provide a number of advantages such as reduced complexity, code reuse, easier collaboration amongst teams, and streamlined dependency management. Additionally, there are several drawbacks such as difficult to scale, performance concerns, requires large amounts of storage, and loss of per-service semantic versioning.
View our Monorepo Issues List
As noted before, monorepos offer some great advantages. Here are some examples when a monorepo is a great choice:
We want to improve the monorepo experience - whether it has multiple services that all get deployed together, or if it's a mobile app in a single repo that needs to be built completely differently for iOS and Android.
The primary stages that will be supporting our development of a better monorepo experience are:
Secondary stages contributing to the betterment of monorepos in GitLab are:
GitLab already has a number of important features that help monorepos:
The primary way for us to improve the monorepo experience is by focusing on the performance of large files inside of repositories and streamlining the CI pipeline for them. We're currently working on the following two initiatives to help with both of those features:
Check out our Verify:Pipeline Security group's ThinkBig about testing in Monorepos:
We are looking at adding native experiences in GitLab such as using AutoDevops to build and deploy to multiple containers in a monorepo. This type of functionality would be a game-changer for large monorepos looking to use Auto DevOps. Enabling users managing large repositories using mutliple containers per repository with CI templates, solves some of the top challenges that are facing organizations adopting DevOps and using monorepos.
GitHub has released a Remote Repository Plug-in to better meet the developer needs around monorepo experiences. This extension enables users to quickly commit to GitHub directly from Visual Studio. This empowers users to easily navigate some of the git complexities that come with monorepos.
GitHub and Perforce recently announced a strategic partnership to combat the limitations of Git when it comes to developing on large mono repositories. Perforce authored a set of GitHub Actions that allow the user to spin up a Perforce Helix Core server when working on repositories that would otherwise not be performant in GitHub alone.