gitlab-qa 10.2.1 → 10.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab/merge_request_templates/Release.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/gitlab/qa/report/relate_failure_issue.rb +21 -16
- 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: 1d4d6777aac07a8fbb1da706af278b89fa4abc6684b37a828ec8f3b8f0cd6c49
|
4
|
+
data.tar.gz: 2852a0396eb280993b58fcfe91f29b89565ba28c27615d12d9c04883aa2cfdac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
@@ -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 =
|
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
|
-
|
67
|
+
return [false, true] unless issue
|
68
68
|
|
69
|
-
|
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
|
-
|
359
|
-
.filter_map { |exception| exception['
|
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
|
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
|
-
|
364
|
-
|
368
|
+
def issue_already_commented?(issue)
|
369
|
+
@commented_issue_list.include?(issue.web_url)
|
365
370
|
end
|
366
371
|
end
|
367
372
|
end
|
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: 10.2.
|
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-
|
11
|
+
date: 2023-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|