Backport of 'Fix Gitaly up-to-date check for versions with a Git revision suffix'

What does this MR do and why?

Backport of "Fix Gitaly up-to-date check for versions with a Git revision suffix" to 19-4-stable-ee.

Since GitLab 19.4, Gitaly built from a shallow clone reports its version as X.Y.Z-g<revision>, so Admin > Gitaly servers marked every external Linux-package Gitaly as not up to date even when it ran the expected version. Gitaly::Server#expected_version? only recognized the full git describe form and compared the revision against the expected version. This replaces SHA_VERSION_REGEX with VERSION_WITH_REVISION_REGEX, capturing both the semantic version and the revision, and passes the check when the captured version equals GITALY_SERVER_VERSION (tagged releases) or when GITALY_SERVER_VERSION is a SHA that starts with the revision (auto-deploy).

Cherry-picked cleanly from the squashed commit; the only difference from the original is spec hunk line numbers.

Original MR: !259320 (merged) Closes: #631560 (closed)

MR acceptance checklist

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

  • This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
  • The MR that fixed the bug on the default branch has been deployed to GitLab.com (not applicable for documentation or spec changes).
  • The MR title is descriptive (e.g. "Backport of 'title of default branch MR'"). This is important, since the title will be copied to the patch blog post.
  • Required labels have been applied to this merge request
  • This MR has been approved by a maintainer (only one approval is required).
  • Ensure the e2e:test-on-omnibus-ee job has succeeded, or if it has failed, investigate the failures. If you determine the failures are unrelated, you may proceed. If you need assistance investigating, request help in the #s_developer_experience Slack channel to confirm the failures are unrelated to the merge request.

Note to the merge request author and maintainer

If you have questions about the patch release process, please:

Edited by Stan Hu

Merge request reports

Loading
Loading