From f3b940e689131e65ce4ad4bf4ae553c7169540c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Thu, 25 Jul 2024 19:25:34 -0300 Subject: [PATCH 1/7] Remove unused shared_context --- .../public_release/omnibus_gitlab_release_spec.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/spec/lib/release_tools/public_release/omnibus_gitlab_release_spec.rb b/spec/lib/release_tools/public_release/omnibus_gitlab_release_spec.rb index da8bb60ec..63f8ffb45 100644 --- a/spec/lib/release_tools/public_release/omnibus_gitlab_release_spec.rb +++ b/spec/lib/release_tools/public_release/omnibus_gitlab_release_spec.rb @@ -508,7 +508,11 @@ describe ReleaseTools::PublicRelease::OmnibusGitlabRelease do FILE end - shared_examples 'upgrade stop is not updated' do + context 'feature flag is disabled' do + before do + disable_feature(:maintain_upgrade_stops) + end + it 'does not check for the upgrade stop' do expect(ReleaseTools::PublicRelease::UpgradeStop) .not_to receive(:new) @@ -518,14 +522,6 @@ describe ReleaseTools::PublicRelease::OmnibusGitlabRelease do end end - context 'feature flag is disabled' do - before do - disable_feature(:maintain_upgrade_stops) - end - - include_examples 'upgrade stop is not updated' - end - context 'feature flag is enabled' do let(:release) do described_class.new(version) -- GitLab From cb9b7d8cee9c8e6e4c007aef9a716efb9d0edf94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Thu, 25 Jul 2024 19:31:55 -0300 Subject: [PATCH 2/7] feat: Auto-update chart required stops In https://gitlab.com/gitlab-org/release-tools/-/merge_requests/2925 we added automatic updates of required stops to Omnibus. Now we're doing the same for the GitLab Helm chart. It's making use of the already existing ReleaseTools::PublicRelease::UpgradeStop class. The logic is pretty similar to what was done to Omnibus, the only difference is which files we need to change on the chart project, and which regex we're using to replace. Changelog: added --- .../public_release/helm_gitlab_release.rb | 108 +++++++++++-- .../helm_gitlab_release_spec.rb | 142 ++++++++++++++++++ 2 files changed, 238 insertions(+), 12 deletions(-) diff --git a/lib/release_tools/public_release/helm_gitlab_release.rb b/lib/release_tools/public_release/helm_gitlab_release.rb index 7a45c471c..bc972f299 100644 --- a/lib/release_tools/public_release/helm_gitlab_release.rb +++ b/lib/release_tools/public_release/helm_gitlab_release.rb @@ -20,6 +20,9 @@ module ReleaseTools # The default branch of the charts project. DEFAULT_BRANCH = Project::HelmGitlab.default_branch + # The file the chart uses to validate required stops are respected + RUN_CHECK_TPL = 'templates/_runcheck.tpl' + # The charts that we manage, and the source of their appVersion fields. # # The keys are the names of the directories the chart files reside in. The @@ -96,6 +99,7 @@ module ReleaseTools compile_changelog update_versions update_version_mapping + update_last_upgrade_stop tag = create_tag @@ -252,10 +256,7 @@ module ReleaseTools end def update_version_mapping_on_branch(branch) - markdown = read_file(VERSION_MAPPING_FILE, branch: branch) - mapping = Helm::VersionMapping.parse(markdown) - - mapping.add(version, gitlab_version) + mapping = updated_version_mapping(branch) commit_version_files( branch, @@ -264,6 +265,18 @@ module ReleaseTools ) end + def updated_version_mapping(branch) + @updated_version_mapping ||= {} + @updated_version_mapping[branch] ||= begin + markdown = read_file(VERSION_MAPPING_FILE, branch: branch) + + mapping = Helm::VersionMapping.parse(markdown) + mapping.add(version, gitlab_version) + + mapping + end + end + def create_tag logger.info('Creating tag', tag: tag_name, project: project_path) @@ -294,9 +307,85 @@ module ReleaseTools ) end - def read_file(file, project: project_path, branch: target_branch) + def update_last_upgrade_stop + return if ReleaseTools::Feature.disabled?(:maintain_upgrade_stops) + + begin + stop = UpgradeStop.new.last_required_stop + chart_stop = required_stop_chart_version(stop) + + logger.info('Last required stop for version detected', last_required_stop: stop) + logger.info('Last required stop for chart version calculated', last_required_stop: chart_stop) + + action = change_upgrade_stop_action!(stop, chart_stop) + + if action.nil? + logger.info('Nothing to be done to apply upgrade stop to GitLab Helm chart', version: version.to_minor, last_required_stop: stop) + return + end + + Retriable.with_context(:api) do + client.create_commit( + project_path, + project.default_branch, + "Update upgrade stop to #{stop}\n\n[ci skip]", + [action] + ) + end + rescue StandardError + logger.fatal('Something went wrong with the GitLab Helm chart upgrade stop. Disable the \'maintain_upgrade_stops\' feature flag, and retry the job. Please notify Distribution about this error.') + + raise + end + end + + def change_upgrade_stop_action!(stop, chart_stop) + gitlab_version_regex = /(?<=[\s]|^)MIN_VERSION=[^\n]*/ + chart_version_regex = /(?<=[\s]|^)CHART_MIN_VERSION=[^\n]*/ + + content = read_file(RUN_CHECK_TPL, branch: project.default_branch, strip: false) + raise_regex_failure(gitlab_version_regex) unless gitlab_version_regex.match?(content) + raise_regex_failure(chart_version_regex) unless chart_version_regex.match?(content) + + new_content = content + .sub(gitlab_version_regex, "MIN_VERSION=#{stop}") + .sub(chart_version_regex, "CHART_MIN_VERSION=#{chart_stop}") + + return nil if content == new_content + + { + action: 'update', + file_path: RUN_CHECK_TPL, + content: new_content + } + end + + def raise_regex_failure(regexp) + raise "The regexp '#{regexp}' does not match in #{RUN_CHECK_TPL}." + end + + def raise_required_stop_is_not_mapped(version) + raise "We can't make #{version} a required stop because it was not detected in the Helm Chart version mapping." + end + + def required_stop_chart_version(gitlab_version_stop) + mapping = updated_version_mapping(DEFAULT_BRANCH) + + # TODO: Currently the Helm chart does not support required stops based on patch versions + # Since this method receives a Version#to_minor, but our version mapping + # has only full versions, we temporarily recreate the full_version with patch `.0`, + # just so we're able to detect the version in the version mapping. + gitlab_version_stop_full_version = "#{gitlab_version_stop}.0" + + chart_version = mapping.rows.find { |r| r.gitlab_version == gitlab_version_stop_full_version }&.helm_version + raise raise_required_stop_is_not_mapped(gitlab_version_stop) unless chart_version + + chart_version.to_minor + end + + def read_file(file, project: project_path, branch: target_branch, strip: true) Retriable.with_context(:api) do - client.file_contents(project, file, branch).strip + strip ? client.file_contents(project, file, branch).strip : client.file_contents(project, file, branch) end end @@ -314,12 +403,7 @@ module ReleaseTools Retriable.with_context(:api) do client - .tree( - project_path, - ref: branch, - path: 'charts/gitlab/charts', - per_page: 100 - ) + .tree(project_path, ref: branch, path: 'charts/gitlab/charts', per_page: 100) .auto_paginate do |entry| paths << File.join(entry.path, CHART_FILE) if entry.type == 'tree' end diff --git a/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb b/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb index 1850d9b75..f203aee4e 100644 --- a/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb +++ b/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb @@ -503,4 +503,146 @@ describe ReleaseTools::PublicRelease::HelmGitlabRelease do end end end + + describe '#update_last_upgrade_stop' do + let(:version) { ReleaseTools::Version.new('7.0.0') } + let(:gitlab_version) { ReleaseTools::Version.new('16.0.0') } + let(:current_upgrade_stop) { "15.1" } + let(:current_chart_upgrade_stop) { "6.1" } + let(:expected_upgrade_stop) { "15.11" } + let(:expected_chart_upgrade_stop) { "6.11" } + let(:run_check_tpl_path) { 'templates/_runcheck.tpl' } + let(:version_mapping) { nil } + let(:version_mapping_file) do + <<~MARKDOWN + foo + + | Chart version | GitLab version | + |---------------|----------------| + | 1.0.0 | 2.0.0 | + | 0.2.0 | 1.0.0 | + | 0.1.0 | 1.0.0 | + #{version_mapping} + bar + MARKDOWN + end + + def run_check_tpl(min_version, chart_min_version) + <<~FILE + set -e + MIN_VERSION=#{min_version} + CHART_MIN_VERSION=#{chart_min_version} + OLD_MAJOR_VERSION=$(echo $OLD_VERSION_STRING | awk -F "." '{print $1}') + OLD_MINOR_VERSION=$(echo $OLD_VERSION_STRING | awk -F "." '{print $1"."$2}') + OLD_CHART_MAJOR_VERSION=$(echo $OLD_CHART_VERSION_STRING | awk -F "." '{print $1}') + OLD_CHART_MINOR_VERSION=$(echo $OLD_CHART_VERSION_STRING | awk -F "." '{print $1"."$2}') + FILE + end + + context 'feature flag is disabled' do + before do + disable_feature(:maintain_upgrade_stops) + end + + it 'does not check for the upgrade stop' do + expect(ReleaseTools::PublicRelease::UpgradeStop) + .not_to receive(:new) + + release = described_class.new(version, gitlab_version, commit: 'foo') + release.update_last_upgrade_stop + end + end + + context 'feature flag is enabled' do + let(:release) do + described_class.new(version, gitlab_version) + end + + def expect_new_upgrade_stop + upgrade_stop_spy = instance_spy(ReleaseTools::PublicRelease::UpgradeStop) + + expect(ReleaseTools::PublicRelease::UpgradeStop) + .to receive(:new) + .and_return(upgrade_stop_spy) + + expect(upgrade_stop_spy) + .to receive(:last_required_stop) + .and_return(expected_upgrade_stop) + end + + def expect_client_file_contents_calls + expect(release.client).to receive(:file_contents) + .with(release.project_path, described_class::VERSION_MAPPING_FILE, 'master') + .and_return(version_mapping_file) + expect(release.client).to receive(:file_contents) + .with(release.project_path, run_check_tpl_path, 'master') + .and_return(run_check_tpl(current_upgrade_stop, current_chart_upgrade_stop)) + end + + before do + enable_feature(:maintain_upgrade_stops) + end + + context "When gitlab_version_stop is not in the version mapping" do + it 'raises an error' do + expect_new_upgrade_stop + expect(release.client).to receive(:file_contents) + .with(release.project_path, described_class::VERSION_MAPPING_FILE, 'master') + .and_return(version_mapping_file) + + expect { release.update_last_upgrade_stop }.to(raise_error do + "We can't make 15.11.0 a required stop because it was not detected in the Helm Chart version mapping." + end) + end + end + + context 'When gitlab_version_stop is in the version mapping' do + let(:version_mapping) { "| 6.11.0 | 15.11.0 |\n" } + + it 'commits the updated upgrade stop' do + expect_new_upgrade_stop + expect_client_file_contents_calls + + expect(release.client).to receive(:create_commit).with( + release.project_path, + 'master', + an_instance_of(String), + [ + { action: 'update', file_path: run_check_tpl_path, content: run_check_tpl(expected_upgrade_stop, expected_chart_upgrade_stop) } + ] + ) + + release.update_last_upgrade_stop + end + + context 'file does not match the expected regular expression or the run_check_tpl_path' do + it 'raise_regex_failure' do + expect_new_upgrade_stop + allow(release.client).to receive(:file_contents) + .with(release.project_path, described_class::VERSION_MAPPING_FILE, 'master') + .and_return(version_mapping_file) + allow(release.client).to receive(:file_contents) + .with(release.project_path, run_check_tpl_path, 'master') + .and_return("foobar") + + expect { release.update_last_upgrade_stop }.to raise_error(/does not match/) + end + end + + context 'upgrade stop is already up to date' do + let(:current_upgrade_stop) { "15.11" } + let(:current_chart_upgrade_stop) { "6.11" } + + it 'does not create a commit' do + expect_new_upgrade_stop + expect_client_file_contents_calls + + expect(release.client).not_to receive(:create_commit) + + release.update_last_upgrade_stop + end + end + end + end + end end -- GitLab From 7d56e3f21996c6b8fb61cbaa99afcc7fb5efdc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Tue, 6 Aug 2024 15:19:39 -0300 Subject: [PATCH 3/7] Avoid breaking lines agressively We have a very strict rule about class size. We don't need to break lines when they don't go over 120 chars. Let's save these for actual code complexity. --- .../public_release/helm_gitlab_release.rb | 51 ++++++------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/lib/release_tools/public_release/helm_gitlab_release.rb b/lib/release_tools/public_release/helm_gitlab_release.rb index bc972f299..a4c891cfe 100644 --- a/lib/release_tools/public_release/helm_gitlab_release.rb +++ b/lib/release_tools/public_release/helm_gitlab_release.rb @@ -77,20 +77,12 @@ module ReleaseTools def execute if gitlab_version.rc? - logger.info( - 'Not releasing Helm for an RC', - version: version, - gitlab_version: gitlab_version - ) + logger.info('Not releasing Helm for an RC', version: version, gitlab_version: gitlab_version) return end - logger.info( - 'Starting release of Helm', - version: version, - gitlab_version: gitlab_version - ) + logger.info('Starting release of Helm', version: version, gitlab_version: gitlab_version) create_target_branch @@ -134,22 +126,14 @@ module ReleaseTools # Update Chart files and root values.yaml on target branch. update = update_chart_files(charts) update.merge!(update_global_version_value(target_branch)) - commit_version_files( - target_branch, - update, - message: version_files_commit_message - ) + commit_version_files(target_branch, update, message: version_files_commit_message) end def update_default_branch_versions(charts) # On the default branch we need to only update the "version" field of # the Chart file. update = update_default_chart_files(charts) - commit_version_files( - DEFAULT_BRANCH, - update, - message: version_files_commit_message - ) + commit_version_files(DEFAULT_BRANCH, update, message: version_files_commit_message) end def verify_chart_files(files) @@ -159,10 +143,7 @@ module ReleaseTools next if CHART_APP_VERSION_SOURCES.key?(name) - logger.error( - 'Aborting Helm release due to unrecognised chart directory', - directory: directory - ) + logger.error('Aborting Helm release due to unrecognised chart directory', directory: directory) raise <<~ERROR The chart located at #{directory} is not recognised by Release Tools. @@ -291,12 +272,7 @@ module ReleaseTools def add_release_metadata(tag) meta_version = version.to_normalized_version - logger.info( - 'Recording release data', - project: project_path, - version: meta_version, - tag: tag.name - ) + logger.info('Recording release data', project: project_path, version: meta_version, tag: tag.name) release_metadata.add_release( name: 'helm-gitlab', @@ -320,7 +296,8 @@ module ReleaseTools action = change_upgrade_stop_action!(stop, chart_stop) if action.nil? - logger.info('Nothing to be done to apply upgrade stop to GitLab Helm chart', version: version.to_minor, last_required_stop: stop) + logger.info('Nothing to be done to apply upgrade stop to GitLab Helm chart', + version: version.to_minor, last_required_stop: stop) return end @@ -333,7 +310,13 @@ module ReleaseTools ) end rescue StandardError - logger.fatal('Something went wrong with the GitLab Helm chart upgrade stop. Disable the \'maintain_upgrade_stops\' feature flag, and retry the job. Please notify Distribution about this error.') + logger.fatal( + <<~ERROR + Something went wrong with the GitLab Helm chart upgrade stop. + Disable the 'maintain_upgrade_stops' feature flag, and retry the job. + Please notify Distribution about this error. + ERROR + ) raise end @@ -417,9 +400,7 @@ module ReleaseTools end def source_for_target_branch - if @commit - logger.info('Using specific commit', project: project_path, commit: @commit) - end + logger.info('Using specific commit', project: project_path, commit: @commit) if @commit @commit || DEFAULT_BRANCH end -- GitLab From d2092573ee970571443e6de580b67fad2825226d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Tue, 20 Aug 2024 17:57:34 -0300 Subject: [PATCH 4/7] Use to_patch instead of manually concatenating strings The to_patch method already default to .0 when no patch version is present, so this is more elegant than concatenating .0 to a string --- lib/release_tools/public_release/helm_gitlab_release.rb | 5 ++--- .../release_tools/public_release/helm_gitlab_release_spec.rb | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/release_tools/public_release/helm_gitlab_release.rb b/lib/release_tools/public_release/helm_gitlab_release.rb index a4c891cfe..780117032 100644 --- a/lib/release_tools/public_release/helm_gitlab_release.rb +++ b/lib/release_tools/public_release/helm_gitlab_release.rb @@ -358,10 +358,9 @@ module ReleaseTools # Since this method receives a Version#to_minor, but our version mapping # has only full versions, we temporarily recreate the full_version with patch `.0`, # just so we're able to detect the version in the version mapping. - gitlab_version_stop_full_version = "#{gitlab_version_stop}.0" - + gitlab_version_stop_full_version = ReleaseTools::Version.new(gitlab_version_stop).to_patch chart_version = mapping.rows.find { |r| r.gitlab_version == gitlab_version_stop_full_version }&.helm_version - raise raise_required_stop_is_not_mapped(gitlab_version_stop) unless chart_version + raise raise_required_stop_is_not_mapped(gitlab_version_stop_full_version) unless chart_version chart_version.to_minor end diff --git a/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb b/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb index f203aee4e..ae9ab66d9 100644 --- a/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb +++ b/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb @@ -574,6 +574,7 @@ describe ReleaseTools::PublicRelease::HelmGitlabRelease do expect(release.client).to receive(:file_contents) .with(release.project_path, described_class::VERSION_MAPPING_FILE, 'master') .and_return(version_mapping_file) + expect(release.client).to receive(:file_contents) .with(release.project_path, run_check_tpl_path, 'master') .and_return(run_check_tpl(current_upgrade_stop, current_chart_upgrade_stop)) @@ -590,9 +591,9 @@ describe ReleaseTools::PublicRelease::HelmGitlabRelease do .with(release.project_path, described_class::VERSION_MAPPING_FILE, 'master') .and_return(version_mapping_file) - expect { release.update_last_upgrade_stop }.to(raise_error do + expect { release.update_last_upgrade_stop }.to raise_error( "We can't make 15.11.0 a required stop because it was not detected in the Helm Chart version mapping." - end) + ) end end -- GitLab From 1785cf8ee30c1b5023dcad81bd51f8b7d173cb49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Tue, 20 Aug 2024 18:45:16 -0300 Subject: [PATCH 5/7] Revert the strip condition We actually can keep striping the files on the chart. We shouldn't have the same problem we had with Omnibus where Rubocop complained, since here in the chart we're not reading a Ruby file, but a tpl instead. --- lib/release_tools/public_release/helm_gitlab_release.rb | 6 +++--- .../public_release/helm_gitlab_release_spec.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/release_tools/public_release/helm_gitlab_release.rb b/lib/release_tools/public_release/helm_gitlab_release.rb index 780117032..636ddaa55 100644 --- a/lib/release_tools/public_release/helm_gitlab_release.rb +++ b/lib/release_tools/public_release/helm_gitlab_release.rb @@ -326,7 +326,7 @@ module ReleaseTools gitlab_version_regex = /(?<=[\s]|^)MIN_VERSION=[^\n]*/ chart_version_regex = /(?<=[\s]|^)CHART_MIN_VERSION=[^\n]*/ - content = read_file(RUN_CHECK_TPL, branch: project.default_branch, strip: false) + content = read_file(RUN_CHECK_TPL, branch: project.default_branch) raise_regex_failure(gitlab_version_regex) unless gitlab_version_regex.match?(content) raise_regex_failure(chart_version_regex) unless chart_version_regex.match?(content) @@ -365,9 +365,9 @@ module ReleaseTools chart_version.to_minor end - def read_file(file, project: project_path, branch: target_branch, strip: true) + def read_file(file, project: project_path, branch: target_branch) Retriable.with_context(:api) do - strip ? client.file_contents(project, file, branch).strip : client.file_contents(project, file, branch) + client.file_contents(project, file, branch).strip end end diff --git a/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb b/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb index ae9ab66d9..c578e04b6 100644 --- a/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb +++ b/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb @@ -609,7 +609,7 @@ describe ReleaseTools::PublicRelease::HelmGitlabRelease do 'master', an_instance_of(String), [ - { action: 'update', file_path: run_check_tpl_path, content: run_check_tpl(expected_upgrade_stop, expected_chart_upgrade_stop) } + { action: 'update', file_path: run_check_tpl_path, content: run_check_tpl(expected_upgrade_stop, expected_chart_upgrade_stop).strip } ] ) -- GitLab From 6485aa1f1dee3dcce8aef73629893de16d712118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Tue, 20 Aug 2024 18:59:47 -0300 Subject: [PATCH 6/7] Log exception with error message By logging the exception, we can track it in Kibana. --- lib/release_tools/public_release/helm_gitlab_release.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/release_tools/public_release/helm_gitlab_release.rb b/lib/release_tools/public_release/helm_gitlab_release.rb index 636ddaa55..e2ec4233c 100644 --- a/lib/release_tools/public_release/helm_gitlab_release.rb +++ b/lib/release_tools/public_release/helm_gitlab_release.rb @@ -309,14 +309,14 @@ module ReleaseTools [action] ) end - rescue StandardError - logger.fatal( - <<~ERROR + rescue StandardError => ex + error_msg = <<~ERROR Something went wrong with the GitLab Helm chart upgrade stop. Disable the 'maintain_upgrade_stops' feature flag, and retry the job. Please notify Distribution about this error. ERROR - ) + + logger.fatal(error_msg, error: ex) raise end -- GitLab From f724a04a0d9231ce383a0e5cf948d7a8761c10c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cunha?= Date: Tue, 20 Aug 2024 19:08:50 -0300 Subject: [PATCH 7/7] Fix rubocop offenses --- lib/release_tools/public_release/helm_gitlab_release.rb | 8 ++++---- .../public_release/helm_gitlab_release_spec.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/release_tools/public_release/helm_gitlab_release.rb b/lib/release_tools/public_release/helm_gitlab_release.rb index e2ec4233c..ab16abb69 100644 --- a/lib/release_tools/public_release/helm_gitlab_release.rb +++ b/lib/release_tools/public_release/helm_gitlab_release.rb @@ -311,10 +311,10 @@ module ReleaseTools end rescue StandardError => ex error_msg = <<~ERROR - Something went wrong with the GitLab Helm chart upgrade stop. - Disable the 'maintain_upgrade_stops' feature flag, and retry the job. - Please notify Distribution about this error. - ERROR + Something went wrong with the GitLab Helm chart upgrade stop. + Disable the 'maintain_upgrade_stops' feature flag, and retry the job. + Please notify Distribution about this error. + ERROR logger.fatal(error_msg, error: ex) diff --git a/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb b/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb index c578e04b6..4d98d9894 100644 --- a/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb +++ b/spec/lib/release_tools/public_release/helm_gitlab_release_spec.rb @@ -574,7 +574,7 @@ describe ReleaseTools::PublicRelease::HelmGitlabRelease do expect(release.client).to receive(:file_contents) .with(release.project_path, described_class::VERSION_MAPPING_FILE, 'master') .and_return(version_mapping_file) - + expect(release.client).to receive(:file_contents) .with(release.project_path, run_check_tpl_path, 'master') .and_return(run_check_tpl(current_upgrade_stop, current_chart_upgrade_stop)) -- GitLab