Skip to content

Store `GITLAB_VERSION` as part of `GitLab Export`

Problem to solve

Today as part of GitLab Export we only store VERSION which indicates a export schema version as described in https://docs.gitlab.com/ee/user/project/settings/import_export.html#version-history.

This is not really translatable to version of GitLab that did the export.

We should consider adding GITLAB_VERSION where we store the GitLab version as-is of GitLab that it did create the export. The version ideally as presented as part of /help: https://gitlab.com/gitlab-org/gitlab/blob/12-5-stable-ee/VERSION.

Having additional informations will give us more flexibility of supporting future exports of GitLab, as it could allow us to switch to GITLAB_VERSION instead of using VERSION as we are doing today.

Proposal

I propose that:

  1. we create the GITLAB_VERSION: that is a context of Gitlab::VERSION.
  2. we create the GITLAB_REVISION: that is a context of Gitlab.revision.

It seems that we would only need to extend the lib/gitlab/import_export/version_saver.rb to add relevant code to persist these files.

Intended users

Links / references

Edited by Kamil Trzciński