gitlab_quality-test_tooling 1.17.0 → 1.18.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 +15 -5
- data/exe/generate-test-session +4 -0
- data/lib/gitlab_quality/test_tooling/gitlab_client/gitlab_client.rb +1 -1
- data/lib/gitlab_quality/test_tooling/report/generate_test_session.rb +5 -2
- data/lib/gitlab_quality/test_tooling/report/relate_failure_issue.rb +1 -3
- data/lib/gitlab_quality/test_tooling/report/report_as_issue.rb +0 -1
- data/lib/gitlab_quality/test_tooling/report/slow_test_issue.rb +1 -1
- data/lib/gitlab_quality/test_tooling/runtime/logger.rb +1 -1
- data/lib/gitlab_quality/test_tooling/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 948fbcd939a7800a4538113fddc717642c4d9fed7dab6d650cd9052c1832f19b
|
4
|
+
data.tar.gz: fbc4cee23cbcd3f7631ac6a03d41f2b8e287590777fef813289013d982efc4f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c8a65eaf48e4ef9800df34a66f0086d3915252444091631fbd76273731008f70be149e3c92d5954644e55839d8a314eb3442411e3a389061e460d66c9d1ea2
|
7
|
+
data.tar.gz: 29f34824d1c5bba8dbe979a10c0e93a8c4c06e7b0b174b96b0150c19e3d6f71bb0fa9a8ef285a2d650af407547084a5e1a7bb2925817dce5d200b6755e864d4c
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gitlab_quality-test_tooling (1.
|
5
|
-
activesupport (>= 6.1, < 7.
|
4
|
+
gitlab_quality-test_tooling (1.18.0)
|
5
|
+
activesupport (>= 6.1, < 7.2)
|
6
6
|
amatch (~> 0.4.1)
|
7
7
|
gitlab (~> 4.19)
|
8
8
|
http (~> 5.0)
|
@@ -16,10 +16,15 @@ PATH
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
activesupport (7.
|
19
|
+
activesupport (7.1.3.2)
|
20
|
+
base64
|
21
|
+
bigdecimal
|
20
22
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
23
|
+
connection_pool (>= 2.2.5)
|
24
|
+
drb
|
21
25
|
i18n (>= 1.6, < 2)
|
22
26
|
minitest (>= 5.1)
|
27
|
+
mutex_m
|
23
28
|
tzinfo (~> 2.0)
|
24
29
|
addressable (2.8.6)
|
25
30
|
public_suffix (>= 2.0.2, < 6.0)
|
@@ -28,7 +33,9 @@ GEM
|
|
28
33
|
tins (~> 1.0)
|
29
34
|
ast (2.4.2)
|
30
35
|
backport (1.2.0)
|
36
|
+
base64 (0.2.0)
|
31
37
|
benchmark (0.3.0)
|
38
|
+
bigdecimal (3.1.6)
|
32
39
|
binding_of_caller (1.0.0)
|
33
40
|
debug_inspector (>= 0.0.1)
|
34
41
|
byebug (11.1.3)
|
@@ -41,6 +48,7 @@ GEM
|
|
41
48
|
coderay (1.1.3)
|
42
49
|
colored2 (3.1.2)
|
43
50
|
concurrent-ruby (1.2.3)
|
51
|
+
connection_pool (2.4.1)
|
44
52
|
cork (0.3.0)
|
45
53
|
colored2 (~> 3.1)
|
46
54
|
crack (0.4.5)
|
@@ -65,6 +73,7 @@ GEM
|
|
65
73
|
diff-lcs (1.5.0)
|
66
74
|
docile (1.4.0)
|
67
75
|
domain_name (0.6.20240107)
|
76
|
+
drb (2.2.1)
|
68
77
|
e2mmap (0.1.0)
|
69
78
|
faraday (2.9.0)
|
70
79
|
faraday-net_http (>= 2.0, < 3.2)
|
@@ -119,7 +128,7 @@ GEM
|
|
119
128
|
httparty (0.21.0)
|
120
129
|
mini_mime (>= 1.0.0)
|
121
130
|
multi_xml (>= 0.5.2)
|
122
|
-
i18n (1.14.
|
131
|
+
i18n (1.14.4)
|
123
132
|
concurrent-ruby (~> 1.0)
|
124
133
|
jaro_winkler (1.5.6)
|
125
134
|
json (2.7.1)
|
@@ -138,10 +147,11 @@ GEM
|
|
138
147
|
method_source (1.0.0)
|
139
148
|
mini_mime (1.1.5)
|
140
149
|
mini_portile2 (2.8.5)
|
141
|
-
minitest (5.
|
150
|
+
minitest (5.22.2)
|
142
151
|
mize (0.4.1)
|
143
152
|
protocol (~> 2.0)
|
144
153
|
multi_xml (0.6.0)
|
154
|
+
mutex_m (0.2.0)
|
145
155
|
nap (1.1.0)
|
146
156
|
nenv (0.3.0)
|
147
157
|
net-http (0.4.1)
|
data/exe/generate-test-session
CHANGED
@@ -31,6 +31,10 @@ options = OptionParser.new do |opts|
|
|
31
31
|
params[:issue_url_file] = issue_url_file
|
32
32
|
end
|
33
33
|
|
34
|
+
opts.on('--pipeline-stages STAGES', STRING, 'Comma-separated list of pipeline stages to include in test session issue') do |pipeline_stages|
|
35
|
+
params[:pipeline_stages] = pipeline_stages.split(',')
|
36
|
+
end
|
37
|
+
|
34
38
|
opts.on('--confidential', "Makes test session issue confidential") do
|
35
39
|
params[:confidential] = true
|
36
40
|
end
|
@@ -27,7 +27,7 @@ module GitlabQuality
|
|
27
27
|
|
28
28
|
raise if @retry_backoff > RETRY_BACK_OFF_DELAY * MAX_RETRY_ATTEMPTS
|
29
29
|
|
30
|
-
warn("#{
|
30
|
+
warn("#{e.class.name} #{e.message}")
|
31
31
|
warn("Sleeping for #{@retry_backoff} seconds before retrying...")
|
32
32
|
sleep @retry_backoff
|
33
33
|
|
@@ -7,15 +7,16 @@ module GitlabQuality
|
|
7
7
|
module TestTooling
|
8
8
|
module Report
|
9
9
|
class GenerateTestSession < ReportAsIssue
|
10
|
-
def initialize(ci_project_token:, **kwargs)
|
10
|
+
def initialize(ci_project_token:, pipeline_stages: nil, **kwargs)
|
11
11
|
super
|
12
12
|
@ci_project_token = ci_project_token
|
13
|
+
@pipeline_stages = Set.new(pipeline_stages)
|
13
14
|
@issue_type = 'issue'
|
14
15
|
end
|
15
16
|
|
16
17
|
private
|
17
18
|
|
18
|
-
attr_reader :ci_project_token
|
19
|
+
attr_reader :ci_project_token, :pipeline_stages
|
19
20
|
|
20
21
|
# rubocop:disable Metrics/AbcSize
|
21
22
|
def run!
|
@@ -27,6 +28,8 @@ module GitlabQuality
|
|
27
28
|
TestResults::JsonTestResults.new(path).to_a
|
28
29
|
end
|
29
30
|
|
31
|
+
tests = tests.select { |test| pipeline_stages.include? test.report["stage"] } unless pipeline_stages.empty?
|
32
|
+
|
30
33
|
issue = gitlab.create_issue(
|
31
34
|
title: "#{Time.now.strftime('%Y-%m-%d')} Test session report | #{Runtime::Env.qa_run_type}",
|
32
35
|
description: generate_description(tests),
|
@@ -1,9 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'nokogiri'
|
4
|
-
require 'active_support/core_ext/enumerable'
|
5
4
|
require 'rubygems/text'
|
6
|
-
require 'active_support/core_ext/integer/time'
|
7
5
|
require 'amatch'
|
8
6
|
|
9
7
|
module GitlabQuality
|
@@ -339,7 +337,7 @@ module GitlabQuality
|
|
339
337
|
def new_issue_due_date(test)
|
340
338
|
return unless test.product_group?
|
341
339
|
|
342
|
-
Date.today
|
340
|
+
Date.today.next_month
|
343
341
|
end
|
344
342
|
|
345
343
|
def update_reports(issue, test)
|
@@ -60,7 +60,6 @@ module GitlabQuality
|
|
60
60
|
| Description | `#{test.name}` |
|
61
61
|
| Test level | #{test.level} |
|
62
62
|
| Hash | `#{test_hash(test)}` |
|
63
|
-
| Reference duration | #{test.run_time} seconds |
|
64
63
|
| Expected duration | < #{test.max_duration_for_test} seconds |
|
65
64
|
#{"| Test case | #{test.testcase} |" if test.testcase}
|
66
65
|
DESCRIPTION
|
@@ -93,7 +93,7 @@ module GitlabQuality
|
|
93
93
|
current_reports_content: reports_note&.body.to_s,
|
94
94
|
test: test,
|
95
95
|
reports_section_header: REPORT_SECTION_HEADER,
|
96
|
-
item_extra_content: found_label,
|
96
|
+
item_extra_content: "(#{test.run_time} seconds) #{found_label}",
|
97
97
|
reports_extra_content: REPORTS_DOCUMENTATION
|
98
98
|
)
|
99
99
|
end
|
@@ -38,7 +38,7 @@ module GitlabQuality
|
|
38
38
|
console_log = console_logger(source: source, level: Env.log_level)
|
39
39
|
file_log = file_logger(source: source, path: log_path)
|
40
40
|
|
41
|
-
|
41
|
+
ActiveSupport::BroadcastLogger.new(console_log, file_log, file_log)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_quality-test_tooling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.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-03-
|
11
|
+
date: 2024-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -201,7 +201,7 @@ dependencies:
|
|
201
201
|
version: '6.1'
|
202
202
|
- - "<"
|
203
203
|
- !ruby/object:Gem::Version
|
204
|
-
version: '7.
|
204
|
+
version: '7.2'
|
205
205
|
type: :runtime
|
206
206
|
prerelease: false
|
207
207
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -211,7 +211,7 @@ dependencies:
|
|
211
211
|
version: '6.1'
|
212
212
|
- - "<"
|
213
213
|
- !ruby/object:Gem::Version
|
214
|
-
version: '7.
|
214
|
+
version: '7.2'
|
215
215
|
- !ruby/object:Gem::Dependency
|
216
216
|
name: amatch
|
217
217
|
requirement: !ruby/object:Gem::Requirement
|