Skip to content

gitaly: Install both external and bundled Git

Patrick Steinhardt requested to merge pks-gitaly-bundled-git into master

What does this MR do?

This MR prepares for the rollout of Gitaly's new bundled Git mode.

In a not-so-distant future, Gitaly will stop to expose the make git target and instead ship e.g. "gitaly-git-v2.35.0" and "gitaly-git-v2.36.0" as bundled Git executables. This allows us to use feature flags to switch between both versions and thus take much of the risk out of version upgrades. Furthermore, this will fix problems during zero-downtime upgrades, where we'd have currently just replaced binaries while Gitaly was running. As a consequence, old Gitaly versions would have unexpectedly used new Git versions for a brief amount of time.

The new naming schema does require us to take full ownership of Git though. This is not much of a problem though: no other component in the stack is using Git, and neither should they. So Gitaly already is the only consumer of Git, and we make that explicit in this MR by merging the Git dependency into Gitaly itself. Gitaly is built last in the set of dependencies, so we don't invalidate caches more frequently by doing this than we did before (I least I think that is the case -- this is something I'm unclear about, please correct me if I'm wrong here).

The final commit then starts to install both the Git distribution and bundled Git, which allows us to slowly migrate to the new bundled Git via a feature flag. Eventually, the Git distribution will not be installed anymore when we have finished the migration.

Related issues

#6557 (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
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for the GitLab Chart opened

Merge request reports