Skip to content

Test usage of default branch on release-toolings

3rd step of &383 (closed)

#1357 (closed) plans to change gitlab-org/gitlab default branch from master to main, ahead of this upcoming change, we need to make sure our processes are still functional.

Purpose of this issue is to test the following processes:

General requirements

Following steps should be completed before the testing

Canonical gitlab-org/gitlab Canonical gitlab-org/gitlab-foss
Screen_Shot_2021-02-02_at_9.50.16 Screen_Shot_2021-02-02_at_9.52.15
Security gitlab-org/gitlab Security gitlab-org/gitlab-foss
Screen_Shot_2021-02-02_at_11.20.36 Screen_Shot_2021-02-02_at_11.19.24

Testing daily deployments

After the testing has been completed:

  • Disable the feature flag
  • Re-enable the auto_deploy:prepare task

Testing RC's

/chatops run release tag 13.9.0-rc41 --gitlab-sha=11c7a28acfcc05e7e2db041eb5119cce777e2e40 

Job https://ops.gitlab.net/gitlab-org/release/tools/-/jobs/3087659

Once the testing has been completed:

  • Delete stable branches from Canonical (for both gitlab-org/gitlab and gitlab-org/gitlab-foss)
  • Delete stable branches from Security (for both gitlab-org/gitlab and gitlab-org/gitlab-foss)
  • Delete stable branches from Dev (for both gitlab-org/gitlab and gitlab-org/gitlab-foss)
  • Disable the feature flag https://ops.gitlab.net/gitlab-org/release/tools/-/feature_flags/188/edit

Testing security releases

Preparation

Validation

Early merge process

/chatops run release merge --security --default-branch --dry-run
/chatops run release merge --security --default-branch
  • Ensure merge requests are set to MWPS
Security Issue A Security Issue B
https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/1236 https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/1241
Screen_Shot_2021-02-12_at_9.08.45 Screen_Shot_2021-02-12_at_9.08.58

Tagging a security release

NOTE: Tagging a security release involves compiling the changelog on the default branch, updating stable branches, and creating tags. This can cause inconvenience on some teams and a manual cleanup was required. If we ever need to test again for gitlab-org/gitlab, we need to 1) Skip the release execution of other projects, probably with a feature flag, and 2) Notify the other teams about it, so they don't be alarmed if they see a tag. See #1441 (comment 508245213) for more details

/chatops run release tag --security 42.1.1 # Or some unrealistic version
  • Ensure tags and changelog were created correctly.
Tags Changelog on 42-1-stable-ee Changelog on master
Screen_Shot_2021-02-12_at_16.02.37 Screen_Shot_2021-02-12_at_12.59.02 Screen_Shot_2021-02-12_at_16.06.07

Note: See here for the explanation about why the changelog was generated on master and not in main

Testing security commands

Ensure the following commands consider the main branch

Clean up

Once the testing is completed and satisfactory:

  • Close the security issues and merge requests
  • Close the fake security release tracking issue

Albeit fake, a new security release was tagged, which triggered a compilation changelog and a new tag on GitLab, GitLab FOSS, Gitaly, Omnibus, CNG, and Charts. We need to clean those up

Steps to clean up GitLab satellite projects

GitLab

GitLab FOSS

Omnibus

Gitaly

CNG

Charts

Clean up

After all testing has been completed:

  • Unprotect main for gitlab-org/gitlab on Canonical, Security and Dev
  • Unprotect main for gitlab-org/gitlab-foss on Canonical, Security and Dev
  • Delete main from gitlab-org/gitlab on Canonical, Security and Dev
  • Delete main from gitlab-org/gitlab-foss on Canonical, Security and Dev

Follow-ups

  • main branch was created as a protected branch, however, no pipelines were triggered for this branch. Based on our CI config rules, pipelines are only executed for master, auto-deploy, and stable branches. Before transitioning to main (step 5 of #1357 (closed)), we need to make sure pipelines are also executed on this branch - gitlab-org/gitlab#320794 (closed)
Edited by Mayra Cabrera