Skip to content

Fix regressions in Gitaly

Patrick Steinhardt requested to merge pks-ci-use-gitaly-git into master

What does this MR do and why?

While the initial focus was below's change, this MR now also bumps the Gitaly version to bump several other regressions which have made it in meanwhile.


With the recent bump of the minimum required Git version in Gitaly to v2.33.0, we have started to see that the pipeline in Rails fails. The issue is that Gitaly doesn't come up anymore because it fails with an error about the Git version being too old. This is because Gitaly picks up the system-provided Git version, which is v2.31.0 right now, and not the Git version as set up by make git.

The root cause of this is an invalid setup of the Git binary path in the setup helper: we only set up the Git path in Gitaly's configuration if we can indeed find the executable. But there are multiple issues here which cause us to not find that executable, which causes us to end up with an empty Git binary path:

- In "setup-test-env", we first generate the configuration and then
  build Gitaly. As a result, there was no chance to build the Git
  executable yet and thus it cannot exist.

- Even if we did build Gitaly, we don't execute "make git" and thus
  won't ever build the Git executable.

- The built Git executable is not cached and thus wouldn't propagate
  across different jobs.

- Last but not least, the path to the Git binary is in fact wrong.

Fix all of these issues by unconditionally setting up the corrected Git binary path in our setup helper, using make git in Gitaly's setup and caching the resulting binaries. To demonstrate that this commit fixes issues with the bump of the minimum required version, we also bump the GITALY_SERVER_VERSION to the first commit which contains the changed requirements.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Patrick Steinhardt

Merge request reports

Loading