gitaly: Migrate to bundled Git distribution
What does this MR do?
In v14.8, Gitaly has introduced support for using a bundled Git environment to execute Git commands. In contrast to the previous full distribution, bundled Git only installs a small subset of Git binaries which Gitaly required as runtime. From this set of binaries Gitaly then bootstraps a full Git execution environment that can fulfill all of its needs. Please refer to 1 for further details.
These bundled Git binaries are installed as a set of "gitaly-" prefixed and version-suffixed files into Gitaly's binary directory. This allows Gitaly to resolve their location automatically, and furthermore it gives Gitaly the ability to ship multiple different Git versions concurrently and switch between them with feature flags.
Over the course of the last two releases we have already migrated the GDK and Omnibus to use bundled Git, and we haven't observed any issues so far. CNG is the last component of our stack that doesn't yet use it, so this commit switches over to bundled Git. Besides allowing the use of feature flags, this change also reduces the size of resulting images because we don't install a complete Git installation anymore. Also, it speeds up compilation of the Git dependency because we only need to compile a subset of binaries now.
The downside of this change is that it requires a backwards-incompatible
change to Gitaly's configuration: use_bundled_binaries
must be enabled
in order for us to use them, and it previously wasn't.
Related issues
Part of gitlab-org/charts/gitlab#3029 (closed)
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
-
Merge Request Title, and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Integration tests added to GitLab QA -
The impact any change in container size has should be evaluated