Skip to content

Enforce upgrade stop at 7.3/16.3

Clemens Beck requested to merge add-upgrade-stop-check-for-16-3 into master

What does this MR do?

Enforce upgrade stop at 7.3/16.3

Do not permit upgrades to 7.4/16.4 if the installation has not upgraded
to 7.3/16.3 before.

Changelog: changed

Related issues

Closes #4895 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, follow the instructions in the "Reviewer Roulette" section of the Danger Bot MR comment, as per the Distribution experimental MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.

Test Plan

  1. Install Chart 7.2.x

    helm install gitlab gitlab/gitlab -n upgrade-stop --create-namespace --version 7.2.0
  2. Upgrade to this branch (mocking Chart 7.4.x)

    This can be mocked with the following patch:

    index e45ea7301..57c75addc 100644
    --- a/Chart.yaml
    +++ b/Chart.yaml
    @@ -1,8 +1,8 @@
     ---
     apiVersion: v1
     name: gitlab
    -version: 7.3.0
    -appVersion: master
    +version: 7.4.0
    +appVersion: 16.4.0
     description: GitLab is the most comprehensive AI-powered DevSecOps Platform.
     keywords:
     - gitlab

    Expectation: The upgrade fails.

    > helm upgrade gitlab ~/repos/gitlab-chart -n upgrade-stop
    Error: UPGRADE FAILED: pre-upgrade hooks failed: job failed: BackoffLimitExceeded
    > kubectl -n upgrade-stop logs gitlab-gitlab-upgrade-check-6tllq 
    It seems you are upgrading the GitLab Helm Chart from 7.2.0 (GitLab 16.2.0) to 7.4.0 (GitLab 16.4.0).
    It is required to upgrade to the latest 7.3.x version first before proceeding.
  3. Upgrade to Chart 7.3.x

    helm upgrade gitlab gitlab/gitlab -n upgrade-stop --create-namespace --version 7.3.0
  4. Upgrade to this branch (mocking Chart 7.4.x)

    Expectation: The upgrade is successful.

    > helm upgrade gitlab ~/repos/gitlab-chart -n upgrade-stop
Edited by Clemens Beck

Merge request reports