gitlab-qa 14.8.1 → 14.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6315dcd0fabc755ecfb2b64cb7ffc5e73cd77fbba288c8f89be93142ac7174e1
4
- data.tar.gz: 557ef329ee26120c50c35f8314853e8d0cb371b52ceeccde7e26e8997b170dd8
3
+ metadata.gz: a6f7bd80ea293183e6498166dfff6ed48a13ae11c6075fbb4a6b8da659486f0c
4
+ data.tar.gz: 1fb02c24469c15088ebaa23607df22dac8237c98afdf3e641bb21c9544d2a6f8
5
5
  SHA512:
6
- metadata.gz: dbbf2dc9b2c8e5a42a98186e360d1da4166dbe1a24de833a2039e171f1ce06eaaf180c757ed8792d2cfbe9ec39e13602821691e761b186af0213e97239742487
7
- data.tar.gz: 44d34468cb7f791ba78648ee726c781de63d1e2096f4f9f444761be0c7d8c006ef0712e6a1aa6b1735d476bdaa0bb46156ad339e81659fcf343e947b9aacf63e
6
+ metadata.gz: f3f8343857638e8ed1c2b1b496bf9f09094fddd9d14f477d7277bd71c37d967e7ecce22eb369e6a105df956a48b7ce92831812aa82356f82578bfaa6b847f1ca
7
+ data.tar.gz: 5ca6e86b327ad376cbae3d58184c8f0ce348f8c6830078b4fd202a16c4ec523ced8ee5e68adf89aa2c79e6a71d40f57955f43271c5fef967661b45078b214e7b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (14.8.1)
4
+ gitlab-qa (14.10.0)
5
5
  activesupport (>= 6.1, < 7.2)
6
6
  gitlab (~> 4.19)
7
7
  http (~> 5.0)
@@ -175,19 +175,19 @@ GEM
175
175
  reverse_markdown (2.1.1)
176
176
  nokogiri
177
177
  rexml (3.2.5)
178
- rspec (3.12.0)
179
- rspec-core (~> 3.12.0)
180
- rspec-expectations (~> 3.12.0)
181
- rspec-mocks (~> 3.12.0)
182
- rspec-core (3.12.0)
183
- rspec-support (~> 3.12.0)
184
- rspec-expectations (3.12.0)
178
+ rspec (3.13.0)
179
+ rspec-core (~> 3.13.0)
180
+ rspec-expectations (~> 3.13.0)
181
+ rspec-mocks (~> 3.13.0)
182
+ rspec-core (3.13.0)
183
+ rspec-support (~> 3.13.0)
184
+ rspec-expectations (3.13.0)
185
185
  diff-lcs (>= 1.2.0, < 2.0)
186
- rspec-support (~> 3.12.0)
187
- rspec-mocks (3.12.0)
186
+ rspec-support (~> 3.13.0)
187
+ rspec-mocks (3.13.1)
188
188
  diff-lcs (>= 1.2.0, < 2.0)
189
- rspec-support (~> 3.12.0)
190
- rspec-support (3.12.0)
189
+ rspec-support (~> 3.13.0)
190
+ rspec-support (3.13.1)
191
191
  rubocop (1.43.0)
192
192
  json (~> 2.3)
193
193
  parallel (~> 1.10)
@@ -280,7 +280,7 @@ DEPENDENCIES
280
280
  pry (~> 0.11)
281
281
  pry-byebug (~> 3.10.1)
282
282
  rake (~> 13.0)
283
- rspec (~> 3.7)
283
+ rspec (~> 3.13)
284
284
  simplecov (~> 0.22)
285
285
  simplecov-cobertura (~> 2.1)
286
286
  solargraph (~> 0.41)
@@ -74,7 +74,7 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
74
74
  | `QA_CAN_TEST_GIT_PROTOCOL_V2` | `true` | Set to `false` to skip tests that require Git protocol v2 if your environment doesn't support it. | No|
75
75
  | `QA_CAN_TEST_ADMIN_FEATURES` | `true` | Set to `false` to skip tests that require admin access. | No|
76
76
  | `QA_CAN_TEST_PRAEFECT` | `true` | Set to `false` to skip tests that require Praefect to be running. | No|
77
- | `QA_DISABLE_RSPEC_RETRY` |- | Set to `true` to turn off retrying tests on failure. | No|
77
+ | `QA_RETRY_FAILED_SPECS` |- | Set to `true` to retry failed specs after initial run finishes. | No|
78
78
  | `QA_SIMULATE_SLOW_CONNECTION` |- | Set to `true` to configure Chrome's network settings to simulate a slow connection. | No|
79
79
  | `QA_SLOW_CONNECTION_LATENCY_MS` | `2000` | The additional latency (in ms) of the simulated slow connection. | No|
80
80
  | `QA_SLOW_CONNECTION_THROUGHPUT_KBPS` | `32` | The maximum throughput (in kbps) of the simulated slow connection. | No|
data/gitlab-qa.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'pry', '~> 0.11'
30
30
  spec.add_development_dependency 'pry-byebug', '~> 3.10.1'
31
31
  spec.add_development_dependency 'rake', '~> 13.0'
32
- spec.add_development_dependency 'rspec', '~> 3.7'
32
+ spec.add_development_dependency 'rspec', '~> 3.13'
33
33
  spec.add_development_dependency 'simplecov', '~> 0.22'
34
34
  spec.add_development_dependency 'simplecov-cobertura', '~> 2.1'
35
35
  spec.add_development_dependency 'solargraph', '~> 0.41'
@@ -189,7 +189,7 @@ module Gitlab
189
189
  raise 'Invalid instance name!' unless name
190
190
  end
191
191
 
192
- def instance_no_teardown
192
+ def instance_no_teardown # rubocop:disable Metrics/AbcSize
193
193
  begin
194
194
  retries ||= 0
195
195
  prepare
@@ -201,12 +201,17 @@ module Gitlab
201
201
  reconfigure_log_file = get_reconfigure_log_file_from_artefact
202
202
  # for scenarios where a service fails during startup, attempt to retry to avoid flaky failures
203
203
  if (retries += 1) < 3
204
- Runtime::Logger.info(
205
- "Follow the document " \
206
- "https://gitlab.com/gitlab-org/quality/runbooks/-/blob/main/debug_orchestrated_test_locally/ " \
207
- "for debugging the test failure locally.")
208
- Runtime::Logger.error("Tailing the reconfigure log file: #{reconfigure_log_file}. Please check #{reconfigure_log_file} " \
209
- "file in the artifacts for more details.")
204
+ unless reconfigure_log_file.nil?
205
+ Runtime::Logger.info(
206
+ "Follow the document " \
207
+ "https://gitlab.com/gitlab-org/quality/runbooks/-/blob/main/debug_orchestrated_test_locally/ " \
208
+ "for debugging the test failure locally.")
209
+
210
+ # Tailing the reconfigure logs after retries are over and before raising exception
211
+ Runtime::Logger.info("Tail of the reconfigure log file, see artifacts for full log: #{reconfigure_log_file}")
212
+ Support::ShellCommand.new("tail -n 100 #{reconfigure_log_file}", stream_output: true).execute!
213
+ end
214
+
210
215
  Runtime::Logger.warn(
211
216
  "Retry instance_no_teardown due to Support::ShellCommand::StatusError -- attempt #{retries}"
212
217
  )
@@ -214,9 +219,14 @@ module Gitlab
214
219
  retry
215
220
  end
216
221
 
217
- # Tailing the reconfigure logs after retries are over and before raising exception
218
- Runtime::Logger.info("Tail of the reconfigure log file, see artifacts for full log: #{reconfigure_log_file}")
219
- Support::ShellCommand.new("tail -n 100 #{reconfigure_log_file}", stream_output: true).execute!
222
+ # Printing logs to stdout for last retry failure
223
+
224
+ if !reconfigure_log_file.nil? && retries == 3
225
+ # Tailing the reconfigure logs after retries are over and before raising exception
226
+ Runtime::Logger.info("Tail of the reconfigure log file, see artifacts for full log: #{reconfigure_log_file}")
227
+ Support::ShellCommand.new("tail -n 100 #{reconfigure_log_file}", stream_output: true).execute!
228
+ end
229
+
220
230
  raise e
221
231
  end
222
232
 
@@ -67,7 +67,8 @@ module Gitlab
67
67
  gitaly['configuration'] = {
68
68
  'listen_addr': '0.0.0.0:#{gitaly_port}',
69
69
  'prometheus_listen_addr': '0.0.0.0:9236',
70
- 'auth_token': 'PRAEFECT_INTERNAL_TOKEN'
70
+ 'auth_token': 'PRAEFECT_INTERNAL_TOKEN',
71
+ 'transactions': {'enabled': #{Runtime::Env.qa_gitaly_transactions_enabled?}}
71
72
  }
72
73
  gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
73
74
  gitlab_rails['internal_api_url'] = 'http://#{cluster_config.gitlab_name}.#{cluster_config.network}';
@@ -68,10 +68,11 @@ module Gitlab
68
68
  rescue Support::ShellCommand::StatusError => e
69
69
  raise e unless retry_failed_specs
70
70
 
71
+ Runtime::Logger.warn("Initial test run failed, attempting to retry failed specs in new process!")
71
72
  results_file = File.join(host_artifacts_dir(name), LAST_RUN_FILE)
72
- raise "Failed to find initial run results file #{results_file}" unless File.exist?(results_file)
73
+ raise e unless valid_last_run_file?(results_file)
73
74
 
74
- Runtime::Logger.warn("Initial test run failed, retrying failed specs in new process!")
75
+ Runtime::Logger.debug("Found initial run results file '#{results_file}', retrying failed specs!")
75
76
  run_specs(name, retry_process: true, initial_run_results_host_path: results_file)
76
77
  end
77
78
 
@@ -116,8 +117,6 @@ module Gitlab
116
117
  end
117
118
 
118
119
  env_vars["RSPEC_LAST_RUN_RESULTS_FILE"] = last_run_results_file
119
- # TODO: remove once rspec-retry gem is removed
120
- env_vars["QA_DISABLE_RSPEC_RETRY"] = "true" if retry_failed_specs
121
120
 
122
121
  run_volumes = volumes.to_h.merge({ host_artifacts_dir(container_name) => tmp_dir })
123
122
  run_volumes[initial_run_results_host_path] = last_run_results_file if retry_process
@@ -221,6 +220,27 @@ module Gitlab
221
220
  def last_run_results_file
222
221
  File.join(tmp_dir, LAST_RUN_FILE)
223
222
  end
223
+
224
+ # Validate rspec last run file
225
+ #
226
+ # @param [String] results_file
227
+ # @return [Boolean]
228
+ def valid_last_run_file?(results_file)
229
+ unless File.exist?(results_file)
230
+ Runtime::Logger.error("Failed to find initial run results file '#{results_file}', aborting retry!")
231
+ return false
232
+ end
233
+
234
+ unless File.read(results_file).include?("failed")
235
+ Runtime::Logger.error(
236
+ "Initial run results file '#{results_file}' does not contain any failed tests, aborting retry!"
237
+ )
238
+
239
+ return false
240
+ end
241
+
242
+ true
243
+ end
224
244
  end
225
245
  end
226
246
  end
@@ -39,7 +39,6 @@ module Gitlab
39
39
  'QA_CAN_TEST_ADMIN_FEATURES' => :qa_can_test_admin_features,
40
40
  'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
41
41
  'QA_CAN_TEST_PRAEFECT' => :qa_can_test_praefect,
42
- 'QA_DISABLE_RSPEC_RETRY' => :qa_disable_rspec_retry,
43
42
  'QA_SIMULATE_SLOW_CONNECTION' => :qa_simulate_slow_connection,
44
43
  'QA_SLOW_CONNECTION_LATENCY_MS' => :qa_slow_connection_latency_ms,
45
44
  'QA_SLOW_CONNECTION_THROUGHPUT_KBPS' => :qa_slow_connection_throughput_kbps,
@@ -371,7 +370,8 @@ module Gitlab
371
370
  end
372
371
 
373
372
  def video_recorder_image
374
- env_var_value_if_defined('QA_VIDEO_RECORDER_IMAGE') || 'registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-manual-video-recorder'
373
+ env_var_value_if_defined('QA_VIDEO_RECORDER_IMAGE') ||
374
+ 'registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-manual-video-recorder'
375
375
  end
376
376
 
377
377
  def video_recorder_version
@@ -471,6 +471,10 @@ module Gitlab
471
471
  enabled?(env_var_value_if_defined('QA_RETRY_FAILED_SPECS'), default: false)
472
472
  end
473
473
 
474
+ def self.qa_gitaly_transactions_enabled?
475
+ enabled?(env_var_value_if_defined('QA_GITALY_TRANSACTIONS_ENABLED'), default: false)
476
+ end
477
+
474
478
  private
475
479
 
476
480
  def enabled?(value, default: true)
@@ -37,7 +37,7 @@ module Gitlab
37
37
  gitlab.skip_availability_check = true
38
38
  gitlab.omnibus_configuration << gitlab_omnibus_configuration
39
39
  rspec_args << "--" unless rspec_args.include?('--')
40
- rspec_args << %w[--tag ~orchestrated]
40
+ rspec_args << "--tag ~orchestrated"
41
41
  gitlab.instance do
42
42
  Component::Specs.perform do |specs|
43
43
  specs.suite = 'Test::Instance::Airgapped'
@@ -22,7 +22,7 @@ module Gitlab
22
22
  cluster.join
23
23
 
24
24
  rspec_args << "--" unless rspec_args.include?('--')
25
- rspec_args << %w[--tag repository_storage]
25
+ rspec_args << "--tag repository_storage]"
26
26
 
27
27
  Component::Specs.perform do |specs|
28
28
  specs.suite = 'Test::Instance::All'
@@ -14,7 +14,7 @@ module Gitlab
14
14
  gitlab.instance do
15
15
  Component::Specs.perform do |specs|
16
16
  rspec_args << '--' unless rspec_args.include?('--')
17
- rspec_args << %w[--tag integrations]
17
+ rspec_args << "--tag integrations"
18
18
  specs.suite = 'Test::Instance::All'
19
19
  specs.hostname = "qa-e2e-specs.#{gitlab.network}"
20
20
  specs.release = gitlab.release
@@ -21,7 +21,7 @@ module Gitlab
21
21
  Runtime::Logger.info('Running Jira specs!')
22
22
 
23
23
  rspec_args << "--" unless rspec_args.include?('--')
24
- rspec_args << %w[--tag jira]
24
+ rspec_args << "--tag jira"
25
25
 
26
26
  Component::Specs.perform do |specs|
27
27
  specs.suite = 'Test::Instance::All'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '14.8.1'
5
+ VERSION = '14.10.0'
6
6
  end
7
7
  end
@@ -42,7 +42,6 @@ module RuboCop
42
42
  'QA_CAN_TEST_ADMIN_FEATURES' => :qa_can_test_admin_features,
43
43
  'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
44
44
  'QA_CAN_TEST_PRAEFECT' => :qa_can_test_praefect,
45
- 'QA_DISABLE_RSPEC_RETRY' => :qa_disable_rspec_retry,
46
45
  'QA_SIMULATE_SLOW_CONNECTION' => :qa_simulate_slow_connection,
47
46
  'QA_SLOW_CONNECTION_LATENCY_MS' => :qa_slow_connection_latency_ms,
48
47
  'QA_SLOW_CONNECTION_THROUGHPUT_KBPS' => :qa_slow_connection_throughput_kbps,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.8.1
4
+ version: 14.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-19 00:00:00.000000000 Z
11
+ date: 2024-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '3.7'
117
+ version: '3.13'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '3.7'
124
+ version: '3.13'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: simplecov
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -536,7 +536,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
536
536
  - !ruby/object:Gem::Version
537
537
  version: '0'
538
538
  requirements: []
539
- rubygems_version: 3.3.26
539
+ rubygems_version: 3.3.27
540
540
  signing_key:
541
541
  specification_version: 4
542
542
  summary: Integration tests for GitLab