Use different source for KAS version
Context
The content of the GITLAB_KAS_VERSION
file is used in the frontend and the API to display/show the KAS semantic version.
We intend to support SHA instead of the semantic version in the GITLAB_KAS_VERSION
. This means that we need to change both the frontend and API to not always expect a semantic version in the GITLAB_KAS_VERSION
file. This also includes any calls to Gitlab::Kas.version
or Gitlab::Kas.version_info
.
Proposal
-
for frontend - use the GitLab version
- affected code:
ClustersHelper#js_clusters_list_data
andClusterAgentsHelper#js_clusters_list_data
- affected code:
-
for the API, if the
GITLAB_KAS_VERSION
is a SHA, use<GITLAB_MAJOR>.<GITLAB_MINOR>.<GITLAB_PATCH>+<KAS_SHA>
- affected API:
/api/v4/metadata
- graphql resolver - see Resolvers::MetadataResolver
- affected API:
Please also check that any calls to Gitlab::Kas.version
or Gitlab::Kas.version_info
will handle the possibility of the GITLAB_KAS_VERSION
content not being a semantic version.