gitlab-qa 7.26.0 → 7.27.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 +4 -4
- data/docs/what_tests_can_be_run.md +2 -0
- data/lib/gitlab/qa/component/base.rb +17 -5
- data/lib/gitlab/qa/component/gitlab.rb +1 -3
- data/lib/gitlab/qa/report/relate_failure_issue.rb +13 -4
- data/lib/gitlab/qa/scenario/test/instance/image.rb +3 -1
- data/lib/gitlab/qa/scenario/test/omnibus/upgrade.rb +1 -0
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6356f61652597dc3ba035658d378b9dd8567a2caad8406cecfcb333143ac8cc7
|
4
|
+
data.tar.gz: 34f326e02a3934f36255509268c60ba8266d9a0e3ed2f6982a1ce1731db8f8e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcc680812bf117752fc8e9bab1e02250b426792de13c38a674b5271fa127e8da564cf167b9b53224e4c454e3fc45aec114034a3a2b6a6f86f62149d206da552c
|
7
|
+
data.tar.gz: 9a773c6483cd726f5b84010597ae8729cc514b55f52034223b40c87e01d5409a45ad8ed0674ef89078a368fb62452de4abdcfaefe67af0bd7572733189bb6f55
|
@@ -637,6 +637,8 @@ container is spun up and tests are run from it by running the
|
|
637
637
|
- `JIRA_ADMIN_USERNAME`: Username for authenticating with Jira server as admin.
|
638
638
|
- `JIRA_ADMIN_PASSWORD`: Password for authenticating with Jira server as admin.
|
639
639
|
|
640
|
+
These values can be found in the shared GitLab QA 1Password vault.
|
641
|
+
|
640
642
|
Example:
|
641
643
|
|
642
644
|
```
|
@@ -146,11 +146,23 @@ module Gitlab
|
|
146
146
|
end
|
147
147
|
|
148
148
|
def instance_no_teardown
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
149
|
+
begin
|
150
|
+
retries ||= 0
|
151
|
+
prepare
|
152
|
+
start
|
153
|
+
reconfigure
|
154
|
+
wait_until_ready
|
155
|
+
process_exec_commands
|
156
|
+
rescue Docker::Shellout::StatusError => e
|
157
|
+
# for scenarios where a service fails during startup, attempt to retry to avoid flaky failures
|
158
|
+
if (retries += 1) < 3
|
159
|
+
puts "Retry instance_no_teardown due to Docker::Shellout::StatusError -- attempt #{retries}"
|
160
|
+
teardown!
|
161
|
+
retry
|
162
|
+
end
|
163
|
+
|
164
|
+
raise e
|
165
|
+
end
|
154
166
|
|
155
167
|
yield self if block_given?
|
156
168
|
end
|
@@ -157,8 +157,7 @@ module Gitlab
|
|
157
157
|
@docker.attach(name) do |line, wait|
|
158
158
|
puts line
|
159
159
|
# TODO, workaround which allows to detach from the container
|
160
|
-
|
161
|
-
break if line =~ /gitlab Reconfigured!/
|
160
|
+
break if /gitlab Reconfigured!/.match?(line)
|
162
161
|
end
|
163
162
|
end
|
164
163
|
|
@@ -166,7 +165,6 @@ module Gitlab
|
|
166
165
|
return if skip_availability_check
|
167
166
|
|
168
167
|
if Availability.new(name, relative_path: relative_path, scheme: scheme, protocol_port: port.to_i).check(Runtime::Env.gitlab_availability_timeout)
|
169
|
-
sleep 12 # TODO, handle that better
|
170
168
|
puts ' -> GitLab is available.'
|
171
169
|
else
|
172
170
|
abort ' -> GitLab unavailable!'
|
@@ -84,10 +84,17 @@ module Gitlab
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
+
def full_stacktrace(test)
|
88
|
+
if test.failures.first['message_lines'].empty?
|
89
|
+
test.failures.first['message']
|
90
|
+
else
|
91
|
+
test.failures.first['message_lines'].join("\n")
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
87
95
|
def find_relevant_failure_issues(test) # rubocop:disable Metrics/AbcSize
|
88
96
|
ld = Class.new.extend(Gem::Text).method(:levenshtein_distance)
|
89
|
-
|
90
|
-
first_test_failure_stacktrace = sanitize_stacktrace(full_stacktrace, FAILURE_STACKTRACE_REGEX) || full_stacktrace
|
97
|
+
first_test_failure_stacktrace = sanitize_stacktrace(full_stacktrace(test), FAILURE_STACKTRACE_REGEX) || full_stacktrace(test)
|
91
98
|
clean_first_test_failure_stacktrace = remove_unique_resource_names(first_test_failure_stacktrace)
|
92
99
|
|
93
100
|
# Search with the `search` param returns 500 errors, so we filter by ~QA and then filter further in Ruby
|
@@ -158,7 +165,7 @@ module Gitlab
|
|
158
165
|
def new_issue_description(test)
|
159
166
|
super + [
|
160
167
|
"\n\n### Stack trace",
|
161
|
-
"```\n#{test
|
168
|
+
"```\n#{full_stacktrace(test)}\n```",
|
162
169
|
"First happened in #{test.ci_job_url}.",
|
163
170
|
"Related test case: #{test.testcase}.",
|
164
171
|
screenshot_section(test)
|
@@ -201,7 +208,9 @@ module Gitlab
|
|
201
208
|
def screenshot_section(test)
|
202
209
|
section = ''
|
203
210
|
|
204
|
-
|
211
|
+
failure = full_stacktrace(test)
|
212
|
+
|
213
|
+
if test.screenshot? && !failure.include?('500 Internal Server Error') && !failure.include?('fabricate_via_api!')
|
205
214
|
relative_url = gitlab.upload_file(file_fullpath: test.failure_screenshot)
|
206
215
|
|
207
216
|
section = "### Screenshot: #{relative_url.markdown}"
|
@@ -4,10 +4,11 @@ module Gitlab
|
|
4
4
|
module Test
|
5
5
|
module Instance
|
6
6
|
class Image < Scenario::Template
|
7
|
-
attr_writer :volumes
|
7
|
+
attr_writer :volumes, :seed_admin_token
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
@volumes = {}
|
11
|
+
@seed_admin_token = true
|
11
12
|
end
|
12
13
|
|
13
14
|
def perform(release, *rspec_args)
|
@@ -15,6 +16,7 @@ module Gitlab
|
|
15
16
|
gitlab.release = release
|
16
17
|
gitlab.volumes = @volumes
|
17
18
|
gitlab.network = 'test'
|
19
|
+
gitlab.seed_admin_token = @seed_admin_token
|
18
20
|
|
19
21
|
gitlab.instance do
|
20
22
|
Component::Specs.perform do |specs|
|
data/lib/gitlab/qa/version.rb
CHANGED
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: 7.
|
4
|
+
version: 7.27.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: 2022-05-
|
11
|
+
date: 2022-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|