gitlab-qa 14.8.1 → 14.9.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: 07bcf4d830b0b1a566f938d304e7fca8060314fe8ec2880a0203a758fc50c366
4
+ data.tar.gz: 9c20f4c1f1c9b234f8fcc4db0f5a38527f2ca6848585bd0f218195841f7cb090
5
5
  SHA512:
6
- metadata.gz: dbbf2dc9b2c8e5a42a98186e360d1da4166dbe1a24de833a2039e171f1ce06eaaf180c757ed8792d2cfbe9ec39e13602821691e761b186af0213e97239742487
7
- data.tar.gz: 44d34468cb7f791ba78648ee726c781de63d1e2096f4f9f444761be0c7d8c006ef0712e6a1aa6b1735d476bdaa0bb46156ad339e81659fcf343e947b9aacf63e
6
+ metadata.gz: 00051bcdf47a11a19a2b106332acca427acf2c824b098bae1d5227927d88b50f5453e520033d3448e8ba2a914fdd04f34af931f19cc31e136c6d4a8bbcf334f8
7
+ data.tar.gz: deaf4242a1a8f543d2414c750e4f610b2e9c6e624b6bfea7a421b0946afab810a8b27bdd518e43fdf9be52f5946e1932d25544e942efc19ae7c64cc827b74074
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.9.0)
5
5
  activesupport (>= 6.1, < 7.2)
6
6
  gitlab (~> 4.19)
7
7
  http (~> 5.0)
@@ -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|
@@ -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,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '14.8.1'
5
+ VERSION = '14.9.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.9.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-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -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