[EE] Replace Gitlab::REVISION with Gitlab.revision and handle installations…
EE MR for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19125.
What does this MR do?
This replaces Gitlab::REVISION
with a Gitlab.revision
which handles installation that don't have a .git
directory. In that case, Gitlab.revision
will return Unknown
.
Are there points in the code the reviewer needs to double check?
This is a quick fix to resolve the %10.8 regression, but I've suggested a more long-term improvement in https://gitlab.com/gitlab-org/gitlab-ce/issues/46600#note_74743108 where we'd use a new REVISION
file and update it at release time.
omnibus-gitlab!2540 (merged) needs to be released in the same release as this fix.
Why was this MR needed?
Because otherwise the revision would be set to fatal: Not a git repository
, which isn't very helpful.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a Backend maintainer
-
-
EE specific content should be in the top level /ee
folder -
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
End-to-end tests pass ( package-qa
manual pipeline job)
What are the relevant issue numbers?
Fixes gitlab-org/gitlab-ce#46600.
Edited by Rémy Coutable