Skip to content

Add version suffix to gitaly-git2go binary

Pavlo Strokov requested to merge ps-git2go-mod-version into master

0 downtime deployment replaces the binaries on the disk and then does the HOP. When gitaly-git2go binary replaced with the new major version, but gitaly process is still of the previous release the gob fails to process marshalled data as it operates with structs of the different import path (module major version is part of the path). The change introduces version suffix to the gitaly-git2go binary. It allows gitaly to call a proper binary of the gitaly-git2go as it now uses a version suffix. At the time of deployment the new binary will be placed and the old one will remain untouched. The running old gitaly process will refer to the old binary of the gitaly-git2go and after HOP the new gitaly binary will refer the new version of the gitaly-git2go.

BinaryPath function support one corner case - for the gitlab.com the deployment is not yet changed, but it already has a new v14 binary of the gitaly-git2go. That is why we first check if versioned binary is present and if not it falls back to the raw name without suffix. That ad hoc fix should be removed once deployment is changed.

Related to #3647 (closed)

Edited by Alessio Caiazza

Merge request reports

Loading