From 9d90518cec6b50c2bcbf607501c329b07d33c127 Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Wed, 4 Aug 2021 16:58:26 -0700 Subject: [PATCH 1/5] Updated gitlab-org/gitlab default branch to main Changed the default branch for the gitlab-org/gitlab project to support https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/1357 Signed-off-by: Gerard Hickey Changelog: changed --- .gitlab-ci.yml | 2 +- charts/gitlab/templates/_helpers.tpl | 2 +- .../external-gitaly/external-omnibus-gitaly.md | 2 +- doc/charts/gitlab/sidekiq/index.md | 4 ++-- doc/development/changelog.md | 2 +- scripts/manage_version.rb | 2 +- spec/scripts/manage_version_spec.rb | 10 +++++----- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d62e4fd4c0..780f503e89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -744,7 +744,7 @@ production_specs_eks: - source "${VARIABLES_FILE}" - app_version=$(ruby -e "require 'yaml'; puts YAML.safe_load(File.read('Chart.yaml'))['appVersion']") - qa_version="nightly" - - if [ "$app_version" != "master" && "$app_version" != "main" ]; then + - if [ "$app_version" != "main" && "$app_version" != "main" ]; then - qa_version="${app_version}-ee" - fi - SIGNUP_DISABLED=true QA_DEBUG=true GITLAB_USERNAME=root GITLAB_PASSWORD=$ROOT_PASSWORD GITLAB_ADMIN_USERNAME=root GITLAB_ADMIN_PASSWORD=$ROOT_PASSWORD EE_LICENSE=$REVIEW_APPS_EE_LICENSE gitlab-qa Test::Instance::Any EE:$qa_version https://$QA_ENVIRONMENT_URL -- $TEST_SUITE diff --git a/charts/gitlab/templates/_helpers.tpl b/charts/gitlab/templates/_helpers.tpl index e533236e53..deb3854130 100644 --- a/charts/gitlab/templates/_helpers.tpl +++ b/charts/gitlab/templates/_helpers.tpl @@ -23,7 +23,7 @@ Usage: 2. Else we just use the version passed as the image tag */}} {{- define "gitlab.parseAppVersion" -}} -{{- $appVersion := coalesce .appVersion "master" -}} +{{- $appVersion := coalesce .appVersion "main" -}} {{- if regexMatch "^\\d+\\.\\d+\\.\\d+(-rc\\d+)?(-pre)?$" $appVersion -}} {{- if eq .prepend "true" -}} {{- printf "v%s" $appVersion -}} diff --git a/doc/advanced/external-gitaly/external-omnibus-gitaly.md b/doc/advanced/external-gitaly/external-omnibus-gitaly.md index cda91b39a3..a1e5f80d56 100644 --- a/doc/advanced/external-gitaly/external-omnibus-gitaly.md +++ b/doc/advanced/external-gitaly/external-omnibus-gitaly.md @@ -35,7 +35,7 @@ _**NOTE**: The values below should be replaced_ ```ruby diff --git a/doc/charts/gitlab/sidekiq/index.md b/doc/charts/gitlab/sidekiq/index.md index 741de8dac3..9ce2f698b9 100644 --- a/doc/charts/gitlab/sidekiq/index.md +++ b/doc/charts/gitlab/sidekiq/index.md @@ -407,8 +407,8 @@ Any queue to which jobs are added but are not represented as a part of at least one pod item *will not be processed*. For a complete list of all queues, see these files in the GitLab source: -1. [`app/workers/all_queues.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/workers/all_queues.yml) -1. [`ee/app/workers/all_queues.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/workers/all_queues.yml) +1. [`app/workers/all_queues.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/main/app/workers/all_queues.yml) +1. [`ee/app/workers/all_queues.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/main/ee/app/workers/all_queues.yml) ### negateQueues diff --git a/doc/development/changelog.md b/doc/development/changelog.md index 73f53f6caf..3b58824ed8 100644 --- a/doc/development/changelog.md +++ b/doc/development/changelog.md @@ -161,7 +161,7 @@ documentation](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History). ### History and Reasoning -This method was adopted from the primary [GitLab codebase](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/changelog.md), as we +This method was adopted from the primary [GitLab codebase](https://gitlab.com/gitlab-org/gitlab/blob/main/doc/development/changelog.md), as we found the workflow to be appealing and familiar. --- diff --git a/scripts/manage_version.rb b/scripts/manage_version.rb index e2aefe4835..a4995337f2 100755 --- a/scripts/manage_version.rb +++ b/scripts/manage_version.rb @@ -139,7 +139,7 @@ class VersionUpdater return if options.dry_run - # Never change appVersion in master branch + # Never change appVersion in main branch chart.update_versions(@chart_version, branch == 'master' ? nil : @app_version) # Only insert into version_mapping when we have both versions, as releases diff --git a/spec/scripts/manage_version_spec.rb b/spec/scripts/manage_version_spec.rb index 06841fe874..3cb8b987ef 100644 --- a/spec/scripts/manage_version_spec.rb +++ b/spec/scripts/manage_version_spec.rb @@ -112,7 +112,7 @@ describe 'scripts/manage_version.rb' do context 'chart_version and app_version provided on master branch' do it 'ignores app_version for update_versions, adds version mapping entry' do - stub_versions(new_version: '1.0.0', app_version: 'master', new_app_version: '1.0.0', branch: 'master') + stub_versions(new_version: '1.0.0', app_version: 'main', new_app_version: '1.0.0', branch: 'master') expect(chart_file).to receive(:update_versions).with('1.0.0', nil) expect(version_mapping).to receive(:insert_version).with('1.0.0', '1.0.0') @@ -131,7 +131,7 @@ describe 'scripts/manage_version.rb' do context 'from master branch' do it 'increases chart patch when receiving an app patch' do - stub_versions(version: '0.0.1', app_version: 'master', new_app_version: '10.8.1') + stub_versions(version: '0.0.1', app_version: 'main', new_app_version: '10.8.1') expect(chart_file).to receive(:update_versions).with('0.0.2', '10.8.1') expect(version_mapping).to receive(:insert_version).with('0.0.2', '10.8.1') @@ -139,7 +139,7 @@ describe 'scripts/manage_version.rb' do end it 'increases chart minor when receiving an app minor' do - stub_versions(version: '0.0.1', app_version: 'master', new_app_version: '10.8.0') + stub_versions(version: '0.0.1', app_version: 'main', new_app_version: '10.8.0') expect(chart_file).to receive(:update_versions).with('0.1.0', '10.8.0') expect(version_mapping).to receive(:insert_version).with('0.1.0', '10.8.0') @@ -147,7 +147,7 @@ describe 'scripts/manage_version.rb' do end it 'increases chart major when receiving an app major' do - stub_versions(version: '0.0.1', app_version: 'master', new_app_version: '11.0.0') + stub_versions(version: '0.0.1', app_version: 'main', new_app_version: '11.0.0') expect(chart_file).to receive(:update_versions).with('1.0.0', '11.0.0') expect(version_mapping).to receive(:insert_version).with('1.0.0', '11.0.0') @@ -155,7 +155,7 @@ describe 'scripts/manage_version.rb' do end it 'increases chart version when receiving RC in a way that matches non-RC behaviour' do - stub_versions(version: '0.0.1', app_version: 'master', new_app_version: '11.0.0-rc1') + stub_versions(version: '0.0.1', app_version: 'main', new_app_version: '11.0.0-rc1') expect(chart_file).to receive(:update_versions).with('1.0.0', '11.0.0-rc1') expect(version_mapping).not_to receive(:insert_version) -- GitLab From 35bedab1a66be50e858fb481473d61d096a6f7c5 Mon Sep 17 00:00:00 2001 From: John Skarbek Date: Mon, 16 Aug 2021 22:04:20 +0000 Subject: [PATCH 2/5] Apply 1 suggestion(s) to 1 file(s) --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 780f503e89..d62e4fd4c0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -744,7 +744,7 @@ production_specs_eks: - source "${VARIABLES_FILE}" - app_version=$(ruby -e "require 'yaml'; puts YAML.safe_load(File.read('Chart.yaml'))['appVersion']") - qa_version="nightly" - - if [ "$app_version" != "main" && "$app_version" != "main" ]; then + - if [ "$app_version" != "master" && "$app_version" != "main" ]; then - qa_version="${app_version}-ee" - fi - SIGNUP_DISABLED=true QA_DEBUG=true GITLAB_USERNAME=root GITLAB_PASSWORD=$ROOT_PASSWORD GITLAB_ADMIN_USERNAME=root GITLAB_ADMIN_PASSWORD=$ROOT_PASSWORD EE_LICENSE=$REVIEW_APPS_EE_LICENSE gitlab-qa Test::Instance::Any EE:$qa_version https://$QA_ENVIRONMENT_URL -- $TEST_SUITE -- GitLab From a43ca052517da76a8bf6d2b16ac201dc43ea68dc Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Mon, 16 Aug 2021 15:07:10 -0700 Subject: [PATCH 3/5] Fixed errant comment --- scripts/manage_version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/manage_version.rb b/scripts/manage_version.rb index a4995337f2..e2aefe4835 100755 --- a/scripts/manage_version.rb +++ b/scripts/manage_version.rb @@ -139,7 +139,7 @@ class VersionUpdater return if options.dry_run - # Never change appVersion in main branch + # Never change appVersion in master branch chart.update_versions(@chart_version, branch == 'master' ? nil : @app_version) # Only insert into version_mapping when we have both versions, as releases -- GitLab From 1ce6af6a77fb8765983b4cd43995cc1ca62329fe Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Mon, 16 Aug 2021 15:53:42 -0700 Subject: [PATCH 4/5] Reverting change so not to apply to subcharts --- charts/gitlab/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/gitlab/templates/_helpers.tpl b/charts/gitlab/templates/_helpers.tpl index deb3854130..e533236e53 100644 --- a/charts/gitlab/templates/_helpers.tpl +++ b/charts/gitlab/templates/_helpers.tpl @@ -23,7 +23,7 @@ Usage: 2. Else we just use the version passed as the image tag */}} {{- define "gitlab.parseAppVersion" -}} -{{- $appVersion := coalesce .appVersion "main" -}} +{{- $appVersion := coalesce .appVersion "master" -}} {{- if regexMatch "^\\d+\\.\\d+\\.\\d+(-rc\\d+)?(-pre)?$" $appVersion -}} {{- if eq .prepend "true" -}} {{- printf "v%s" $appVersion -}} -- GitLab From 019761eee05d1c098e1d96f191a8e1b33396722d Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Tue, 12 Oct 2021 08:10:16 -0700 Subject: [PATCH 5/5] Revert app_version refs in manage_version_spec.rb back to master --- spec/scripts/manage_version_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/scripts/manage_version_spec.rb b/spec/scripts/manage_version_spec.rb index 3cb8b987ef..06841fe874 100644 --- a/spec/scripts/manage_version_spec.rb +++ b/spec/scripts/manage_version_spec.rb @@ -112,7 +112,7 @@ describe 'scripts/manage_version.rb' do context 'chart_version and app_version provided on master branch' do it 'ignores app_version for update_versions, adds version mapping entry' do - stub_versions(new_version: '1.0.0', app_version: 'main', new_app_version: '1.0.0', branch: 'master') + stub_versions(new_version: '1.0.0', app_version: 'master', new_app_version: '1.0.0', branch: 'master') expect(chart_file).to receive(:update_versions).with('1.0.0', nil) expect(version_mapping).to receive(:insert_version).with('1.0.0', '1.0.0') @@ -131,7 +131,7 @@ describe 'scripts/manage_version.rb' do context 'from master branch' do it 'increases chart patch when receiving an app patch' do - stub_versions(version: '0.0.1', app_version: 'main', new_app_version: '10.8.1') + stub_versions(version: '0.0.1', app_version: 'master', new_app_version: '10.8.1') expect(chart_file).to receive(:update_versions).with('0.0.2', '10.8.1') expect(version_mapping).to receive(:insert_version).with('0.0.2', '10.8.1') @@ -139,7 +139,7 @@ describe 'scripts/manage_version.rb' do end it 'increases chart minor when receiving an app minor' do - stub_versions(version: '0.0.1', app_version: 'main', new_app_version: '10.8.0') + stub_versions(version: '0.0.1', app_version: 'master', new_app_version: '10.8.0') expect(chart_file).to receive(:update_versions).with('0.1.0', '10.8.0') expect(version_mapping).to receive(:insert_version).with('0.1.0', '10.8.0') @@ -147,7 +147,7 @@ describe 'scripts/manage_version.rb' do end it 'increases chart major when receiving an app major' do - stub_versions(version: '0.0.1', app_version: 'main', new_app_version: '11.0.0') + stub_versions(version: '0.0.1', app_version: 'master', new_app_version: '11.0.0') expect(chart_file).to receive(:update_versions).with('1.0.0', '11.0.0') expect(version_mapping).to receive(:insert_version).with('1.0.0', '11.0.0') @@ -155,7 +155,7 @@ describe 'scripts/manage_version.rb' do end it 'increases chart version when receiving RC in a way that matches non-RC behaviour' do - stub_versions(version: '0.0.1', app_version: 'main', new_app_version: '11.0.0-rc1') + stub_versions(version: '0.0.1', app_version: 'master', new_app_version: '11.0.0-rc1') expect(chart_file).to receive(:update_versions).with('1.0.0', '11.0.0-rc1') expect(version_mapping).not_to receive(:insert_version) -- GitLab