gitlab-qa 10.2.0 → 10.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aede5d84c866e5e020124c2e7d5df9e3a19a142ce774482eb6c05520c4442332
4
- data.tar.gz: cc24b8d169a913fe0f8ff0ab69429201ded46e2ba10e6c1bd861a791b92e7683
3
+ metadata.gz: 1d4d6777aac07a8fbb1da706af278b89fa4abc6684b37a828ec8f3b8f0cd6c49
4
+ data.tar.gz: 2852a0396eb280993b58fcfe91f29b89565ba28c27615d12d9c04883aa2cfdac
5
5
  SHA512:
6
- metadata.gz: 2e12535c73f7452f7ee0b4298d3ea04f3ddc24e759bd98c2ac43241fc85585d85ebcbe7cb14bfdb72a898417ddd5485b698d9fdc3345687a4a6964b18139f567
7
- data.tar.gz: 00f4bd3f028d2b96f9cb251dd0816c29c8cf5365bc5243765c833b8d03c8ba47f57ecdda5eaa7204772a9965f6a864296b069b607a5317ea558026a216b240ba
6
+ metadata.gz: 8592539a7d61dbfd902853a53ad48310fdf216fb455be221d3d55fc27f1327919550844dade5496d003c83b54d9dfec9c4eafc7e78451b84e3d5b700c188f30c
7
+ data.tar.gz: cd50e445144fb5d2f70f91eb2ef3b0355f2b78c3712722746571703d7d1bcfa34f41e5462e5ddfa92bb13ae9b206662399dad78f3be8cfa7efc9cb7d42a44545
@@ -32,4 +32,9 @@ with the latest commit from https://gitlab.com/gitlab-org/gitlab-qa/commits/mast
32
32
  - Checklist after merging:
33
33
  - [ ] [Update the release notes for the newly created tag](docs/release_process.md#how-to).
34
34
 
35
+ - Checklist after gitlab-qa version has been released by the post merge pipeline:
36
+ - [ ] In the pipeline-common project, [update the GITLAB_QA_VERSION](https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/base.gitlab-ci.yml) and [create a release](https://gitlab.com/gitlab-org/quality/pipeline-common#release-process).
37
+ - [ ] In the GitLab project, update the ref for pipeline-common for [package-and-test](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/package-and-test/main.gitlab-ci.yml) and [review-apps](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/review-apps/qa.gitlab-ci.yml).
38
+ - [ ] Unless already done by [renovate-gitlab-bot](https://gitlab.com/dashboard/merge_requests?scope=all&state=opened&author_username=gitlab-dependency-update-bot&label_name[]=Quality), or if you need it sooner, in the GitLab project, [update the gitlab-qa gem version](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/Gemfile) and [`Gemfile.lock`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/Gemfile.lock) (for an example, see: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117054).
39
+
35
40
  /label ~Quality ~"type::maintenance" ~"maintenance::dependency"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (10.2.0)
4
+ gitlab-qa (10.2.2)
5
5
  activesupport (~> 6.1)
6
6
  gitlab (~> 4.18.0)
7
7
  http (~> 5.0)
@@ -315,7 +315,7 @@ $ gitlab-qa Test::Omnibus::Upgrade CE
315
315
  $ gitlab-qa Test::Omnibus::Upgrade gitlab/gitlab-ce:my-custom-tag
316
316
  ```
317
317
 
318
- ### `Test::Omnibus::UpdateFromPrevious <full image address> <current_version> <major|minor>`
318
+ ### `Test::Omnibus::UpdateFromPrevious <full image address> <current_version> <major|minor> <from_edition>`
319
319
 
320
320
  Scenario verifies upgrade from previous (major|minor) version to current release.
321
321
 
@@ -19,7 +19,7 @@ module Gitlab
19
19
  FAILED_JOB_DESCRIPTION_REGEX = %r{First happened in https?:\/\/\S+\.}m.freeze
20
20
  FAILED_JOB_NOTE_REGEX = %r{Failed most recently in \D+ pipeline: https?:\/\/\S+}.freeze
21
21
  NEW_ISSUE_LABELS = Set.new(%w[QA Quality test failure::new priority::2]).freeze
22
- IGNORE_EXCEPTIONS = ['Net::ReadTimeout'].freeze
22
+ IGNORE_EXCEPTIONS = ['Net::ReadTimeout', '403 Forbidden - Your account has been blocked'].freeze
23
23
 
24
24
  MultipleIssuesFound = Class.new(StandardError)
25
25
 
@@ -53,10 +53,10 @@ module Gitlab
53
53
  puts " => Searching issues for test '#{test.name}'..."
54
54
 
55
55
  begin
56
- issue = test.quarantine? ? find_and_link_issue(test) : find_and_link_issue(test) || create_issue(test)
57
- return unless issue
56
+ issue, issue_already_commented = find_and_link_issue(test)
57
+ return create_issue(test) unless issue || test.quarantine?
58
58
 
59
- update_labels(issue, test)
59
+ update_labels(issue, test) unless issue_already_commented
60
60
  rescue MultipleIssuesFound => e
61
61
  warn(e.message)
62
62
  end
@@ -64,19 +64,18 @@ module Gitlab
64
64
 
65
65
  def find_and_link_issue(test)
66
66
  issue, diff_ratio = find_failure_issue(test)
67
- issue_already_commented = issue ? @commented_issue_list.include?(issue.web_url) : nil
67
+ return [false, true] unless issue
68
68
 
69
- if issue && !issue_already_commented
69
+ issue_already_commented = issue_already_commented?(issue)
70
+ if issue_already_commented
71
+ puts " => Failure already commented on issue."
72
+ else
70
73
  puts " => Found issue #{issue.web_url} for test '#{test.name}' with a diff ratio of #{(diff_ratio * 100).round(2)}%."
71
74
  post_or_update_failed_job_note(issue, test)
72
75
  @commented_issue_list.add(issue.web_url)
73
- else
74
- puts " => Failure already commented on issue." if issue_already_commented
75
-
76
- return false
77
76
  end
78
77
 
79
- issue
78
+ [issue, issue_already_commented]
80
79
  end
81
80
 
82
81
  def create_issue(test)
@@ -286,6 +285,8 @@ module Gitlab
286
285
  current_note = "Failed most recently in #{pipeline} pipeline: #{test.ci_job_url}"
287
286
  existing_note = existing_failure_note(issue)
288
287
 
288
+ return if existing_note && current_note == existing_note.body
289
+
289
290
  if existing_note
290
291
  gitlab.edit_issue_note(issue_iid: issue.iid, note_id: existing_note.id, note: current_note)
291
292
  else
@@ -355,13 +356,17 @@ module Gitlab
355
356
  # @param [Array<Hash>] exceptions the exceptions associated with the failure.
356
357
  # @return [String] the reason to ignore the exceptions, or `nil` if any exceptions should not be ignored.
357
358
  def ignore_failure_reason(exceptions)
358
- exception_classes = exceptions
359
- .filter_map { |exception| exception['class'] if IGNORE_EXCEPTIONS.include?(exception['class']) }
359
+ exception_messages = exceptions
360
+ .filter_map { |exception| exception['message'] if IGNORE_EXCEPTIONS.any? { |e| exception['message'].include?(e) } }
360
361
  .compact
361
- return if exception_classes.empty? || exception_classes.size < exceptions.size
362
+ return if exception_messages.empty? || exception_messages.size < exceptions.size
363
+
364
+ msg = exception_messages.many? ? 'the errors were' : 'the error was'
365
+ "#{msg} #{exception_messages.join(', ')}"
366
+ end
362
367
 
363
- msg = exception_classes.many? ? 'the errors were' : 'the error was'
364
- "#{msg} #{exception_classes.join(', ')}"
368
+ def issue_already_commented?(issue)
369
+ @commented_issue_list.include?(issue.web_url)
365
370
  end
366
371
  end
367
372
  end
@@ -22,11 +22,18 @@ module Gitlab
22
22
  # @param [Array] *rspec_args rspec arguments
23
23
  # @return [void]
24
24
  def perform(release, current_version, semver_component, from_edition = nil, *rspec_args)
25
+ # When from_edition isn't actually passed but RSpec args arg passed with `-- rspec_args...`,
26
+ # from_edition is wrongly set to `--`, so we fix that here.
27
+ if from_edition == "--"
28
+ rspec_args.prepend('--')
29
+ from_edition = nil
30
+ end
31
+
25
32
  @current_release = QA::Release.new(release)
26
33
  @upgrade_path = Support::GitlabUpgradePath.new(
27
34
  current_version,
28
35
  semver_component,
29
- from_edition.nil? || from_edition == "--" ? @current_release.edition : from_edition
36
+ from_edition || @current_release.edition
30
37
  ).fetch
31
38
 
32
39
  upgrade_info = "#{[*upgrade_path, current_release].join(' => ')} (#{current_version})".bright
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '10.2.0'
5
+ VERSION = '10.2.2'
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: 10.2.0
4
+ version: 10.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-13 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control