diff --git a/doc/administration/gitaly/index.md b/doc/administration/gitaly/index.md index e433c588cdd..1dac87a48c0 100644 --- a/doc/administration/gitaly/index.md +++ b/doc/administration/gitaly/index.md @@ -70,7 +70,7 @@ the current status of these issues, please refer to the referenced issues and ep | Issue | Summary | How to avoid | |:--------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------| -| Gitaly Cluster + Geo - Issues retrying failed syncs | If Gitaly Cluster is used on a Geo secondary site, repositories that have failed to sync could continue to fail when Geo tries to resync them. Recovering from this state requires assistance from support to run manual steps. Work is in-progress to update Gitaly Cluster to [identify repositories with a unique and persistent identifier](https://gitlab.com/gitlab-org/gitaly/-/issues/3485), which is expected to resolve the issue. | No known solution at this time. | +| Gitaly Cluster + Geo - Issues retrying failed syncs | If Gitaly Cluster is used on a Geo secondary site, repositories that have failed to sync could continue to fail when Geo tries to resync them. Recovering from this state requires assistance from support to run manual steps. Work is in-progress to update Gitaly Cluster to [identify repositories with a unique and persistent identifier](https://gitlab.com/gitlab-org/gitaly/-/issues/3485), which is expected to resolve the issue. | No known solution prior to GitLab 15.0. In GitLab 15.0 to 15.2, enable the [`gitaly_praefect_generated_replica_paths` feature flag](#praefect-generated-replica-paths-gitlab-150-and-later). In GitLab 15.3, the feature flag has been default enabled. | | Praefect unable to insert data into the database due to migrations not being applied after an upgrade | If the database is not kept up to date with completed migrations, then the Praefect node is unable to perform normal operation. | Make sure the Praefect database is up and running with all migrations completed (For example: `/opt/gitlab/embedded/bin/praefect -config /var/opt/gitlab/praefect/config.toml sql-migrate-status` should show a list of all applied migrations). Consider [requesting upgrade assistance](https://about.gitlab.com/support/scheduling-upgrade-assistance/) so your upgrade plan can be reviewed by support. | | Restoring a Gitaly Cluster node from a snapshot in a running cluster | Because the Gitaly Cluster runs with consistent state, introducing a single node that is behind will result in the cluster not being able to reconcile the nodes data and other nodes data | Don't restore a single Gitaly Cluster node from a backup snapshot. If you must restore from backup, it's best to snapshot all Gitaly Cluster nodes at the same time and take a database dump of the Praefect database. | diff --git a/qa/Gemfile b/qa/Gemfile index 122f5a524d3..7c46d35bb48 100644 --- a/qa/Gemfile +++ b/qa/Gemfile @@ -29,6 +29,7 @@ gem 'influxdb-client', '~> 1.17' gem 'terminal-table', '~> 3.0.0', require: false gem 'slack-notifier', '~> 2.4', require: false gem 'fog-google', '~> 1.17', require: false +gem "warning", "~> 1.3" gem 'confiner', '~> 0.3' diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock index 434219d3cde..ff382788c5a 100644 --- a/qa/Gemfile.lock +++ b/qa/Gemfile.lock @@ -307,6 +307,7 @@ GEM procto (~> 0.0.2) uuid (2.3.9) macaddr (~> 1.0) + warning (1.3.0) watir (6.19.1) regexp_parser (>= 1.2, < 3) selenium-webdriver (>= 3.142.7) @@ -355,6 +356,7 @@ DEPENDENCIES slack-notifier (~> 2.4) terminal-table (~> 3.0.0) timecop (~> 0.9.1) + warning (~> 1.3) webdrivers (~> 5.0) zeitwerk (~> 2.4) diff --git a/qa/qa.rb b/qa/qa.rb index 7d2f363143b..dd6462cfe27 100644 --- a/qa/qa.rb +++ b/qa/qa.rb @@ -17,8 +17,6 @@ require 'active_support/core_ext/hash' require 'active_support/core_ext/object/blank' require 'rainbow/refinement' -require_relative 'qa/support/fips' - module QA root = "#{__dir__}/qa" @@ -67,7 +65,8 @@ module QA "registry_tls" => "RegistryTLS", "jetbrains" => "JetBrains", "vscode" => "VSCode", - "registry_with_cdn" => "RegistryWithCDN" + "registry_with_cdn" => "RegistryWithCDN", + "fips" => "FIPS" ) # Configure knapsack at the very begining of the setup @@ -77,3 +76,10 @@ module QA loader.setup end + +# Custom warning processing +Warning.process do |warning| + QA::Runtime::Logger.warn(warning.strip) +end + +Warning.ignore(/already initialized constant Chemlab::Vendor|previous definition of Vendor was here/) diff --git a/qa/qa/scenario/test/sanity/selectors.rb b/qa/qa/scenario/test/sanity/selectors.rb index 8b355c5faf6..688fede1b2e 100644 --- a/qa/qa/scenario/test/sanity/selectors.rb +++ b/qa/qa/scenario/test/sanity/selectors.rb @@ -19,7 +19,7 @@ module QA validators.flat_map(&:errors).tap do |errors| break if errors.none? - warn <<~EOS + warn <<~WARN GitLab QA sanity selectors validation test detected problems with your merge request! @@ -42,15 +42,14 @@ module QA contribute, please open an issue in GitLab QA issue tracker. Please see errors described below. - - EOS + WARN warn errors end validators.each(&:validate!) - puts 'Views / selectors validation passed!' + QA::Runtime::Logger.info('Views / selectors validation passed!') end end end diff --git a/qa/spec/scenario/test/sanity/selectors_spec.rb b/qa/spec/scenario/test/sanity/selectors_spec.rb index 2a68dd23219..ecc8e0e0f2c 100644 --- a/qa/spec/scenario/test/sanity/selectors_spec.rb +++ b/qa/spec/scenario/test/sanity/selectors_spec.rb @@ -5,20 +5,26 @@ RSpec.describe QA::Scenario::Test::Sanity::Selectors do before do stub_const('QA::Page::Validator', validator) + + allow(QA::Runtime::Logger).to receive(:warn) + allow(QA::Runtime::Logger).to receive(:info) end context 'when there are errors detected' do + let(:error) { 'some error' } + before do - allow(validator).to receive(:errors).and_return(['some error']) + allow(validator).to receive(:errors).and_return([error]) end - it 'outputs information about errors' do - expect { described_class.perform } - .to output(/some error/).to_stderr + it 'outputs information about errors', :aggregate_failures do + described_class.perform - expect { described_class.perform } - .to output(/electors validation test detected problems/) - .to_stderr + expect(QA::Runtime::Logger).to have_received(:warn) + .with(/GitLab QA sanity selectors validation test detected problems/) + + expect(QA::Runtime::Logger).to have_received(:warn) + .with(/#{error}/) end end diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb index 2f89d36c014..d228fb084c3 100644 --- a/spec/features/projects_spec.rb +++ b/spec/features/projects_spec.rb @@ -329,7 +329,7 @@ RSpec.describe 'Project' do it 'has working links to submodules' do click_link('645f6c4c') - expect(page).to have_selector('.qa-branches-select', text: '645f6c4c82fd3f5e06f67134450a570b795e55a6') # rubocop:disable QA/SelectorUsage + expect(page).to have_selector('[data-testid="branches-select"]', text: '645f6c4c82fd3f5e06f67134450a570b795e55a6') end context 'for signed commit on default branch', :js do