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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afdf52b910858a3f1ec0729d2eef2d170938d282cd116af17af424afc92fcae0
4
- data.tar.gz: 1fb9f558a932a9344b774bc3d873e9184f8c31dd8472c4f51aa0a7ac0626422e
3
+ metadata.gz: 6356f61652597dc3ba035658d378b9dd8567a2caad8406cecfcb333143ac8cc7
4
+ data.tar.gz: 34f326e02a3934f36255509268c60ba8266d9a0e3ed2f6982a1ce1731db8f8e8
5
5
  SHA512:
6
- metadata.gz: 3cb4ab49fee9a1ade2abd1125bb5a8ae020c0343a06415d74130709fd5556f715a49010ee6e9b31e1abb9b0c8ece9dc7f3f63e3c85606f21a02434ab276da030
7
- data.tar.gz: bd5310d35ede8bef9b8aabc2113a76841a530b11e95e15bc87d82d45e7242b0efb7d6c170f6d2c785d7f7cf8b603c8367dc0b2994f8d1481fff2c8eab8d908a5
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
- prepare
150
- start
151
- reconfigure
152
- wait_until_ready
153
- process_exec_commands
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
- full_stacktrace = test.failures.first['message_lines'].join("\n")
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.failures.first['message_lines'].join("\n")}\n```",
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
- if test.screenshot? && !test.failures.first['message'].include?('500 Internal Server Error')
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|
@@ -23,6 +23,7 @@ module Gitlab
23
23
  Scenario::Test::Instance::Image
24
24
  .perform(ce_release.to_ee, *rspec_args) do |scenario|
25
25
  scenario.volumes = volumes
26
+ scenario.seed_admin_token = false
26
27
  end
27
28
  end
28
29
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '7.26.0'
5
+ VERSION = '7.27.0'
6
6
  end
7
7
  end
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.26.0
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-12 00:00:00.000000000 Z
11
+ date: 2022-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control