Skip to content

Product version

Alessio Caiazza requested to merge product-version into master

What does this MR do?

This merge request introduces the concept of product version, it's the high-level representation of a GitLab, the DevOps Platform, version.

Why do we need it?

Our tooling started with just omnibus packages but it grew in complexity with too many version concepts.

We have $DEPLOY_VERSION, an environment variable that travels across several projects as pipeline trigger variable, that represents an omnibus package version.

Then we have omnibus tags, that looks like an omnibus package version, but they have + instead of -

AutoDeploy introduces a completely new set of versions where we have the same major.minor that the current monthly release, but the patch is the timestamp of when it was tagged. This major.minor.patch is what we call a normalized version and this concept was introduced to tame the metadata recording problem.

But this major.minor.timestamp was built to normalize monthly and auto_deploy releases, in every other place we refer to auto_deploy packages with the omnibus package version that has yet another format: major.minor.timestamp-rails_SHA_11.omnibus_SHA_11. The problem with this format is that it completely ignores CNG and helm changes.

When we started working on the single coordinator pipeline in release-tools, we decided to stick with the normalized major.minor.timestamp version for tagging release-tools, giving a strong connection between a release-tools pipeline and a version of GitLab.

What's included in this MR?

This is the first step in introducing RelaseTools::ProductVersion and refactoring all the existing classes that are dealing with release/metadata information.

In this first iteration is possible to create a RelaseTools::ProductVersion from a ReleaseTools::AutoDeploy::Version and from an omnibus package version.

Then we can fetch and extract metadata in a structured way.

Next iteration

  • we should have functions for generating every type of version we support from a ProductVersion. i.e. omnibus package (DEPLOY_VERSIO), CNG images, auto_deploy package, helm chart
  • we should have an easy way to compare two product versions, giving an outline of changed components and liks to code changes in each of those

Author Check-list

Edited by Alessio Caiazza

Merge request reports

Loading