gitlab-qa 14.8.1 → 14.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/docs/what_tests_can_be_run.md +1 -1
- data/lib/gitlab/qa/component/specs.rb +24 -4
- data/lib/gitlab/qa/runtime/env.rb +0 -1
- data/lib/gitlab/qa/version.rb +1 -1
- data/rubocop/cop/gitlab/dangerous_interpolation.rb +0 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07bcf4d830b0b1a566f938d304e7fca8060314fe8ec2880a0203a758fc50c366
|
4
|
+
data.tar.gz: 9c20f4c1f1c9b234f8fcc4db0f5a38527f2ca6848585bd0f218195841f7cb090
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00051bcdf47a11a19a2b106332acca427acf2c824b098bae1d5227927d88b50f5453e520033d3448e8ba2a914fdd04f34af931f19cc31e136c6d4a8bbcf334f8
|
7
|
+
data.tar.gz: deaf4242a1a8f543d2414c750e4f610b2e9c6e624b6bfea7a421b0946afab810a8b27bdd518e43fdf9be52f5946e1932d25544e942efc19ae7c64cc827b74074
|
data/Gemfile.lock
CHANGED
@@ -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
|
-
| `
|
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
|
73
|
+
raise e unless valid_last_run_file?(results_file)
|
73
74
|
|
74
|
-
Runtime::Logger.
|
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,
|
data/lib/gitlab/qa/version.rb
CHANGED
@@ -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.
|
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-
|
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.
|
539
|
+
rubygems_version: 3.3.27
|
540
540
|
signing_key:
|
541
541
|
specification_version: 4
|
542
542
|
summary: Integration tests for GitLab
|