gitlab_quality-test_tooling 1.18.0 → 1.19.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 +1 -1
- data/exe/generate-test-session +1 -1
- data/lib/gitlab_quality/test_tooling/concerns/find_set_dri.rb +21 -9
- data/lib/gitlab_quality/test_tooling/report/relate_failure_issue.rb +1 -1
- data/lib/gitlab_quality/test_tooling/test_meta/processor/add_to_blocking_processor.rb +2 -1
- data/lib/gitlab_quality/test_tooling/test_meta/test_meta_updater.rb +2 -2
- data/lib/gitlab_quality/test_tooling/test_result/base_test_result.rb +4 -0
- data/lib/gitlab_quality/test_tooling/test_result/json_test_result.rb +4 -0
- data/lib/gitlab_quality/test_tooling/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: 49251bc15b93d718cfff854a53a7a636c0c7146dc5ef10122da6485b61394cbd
|
4
|
+
data.tar.gz: 45aa8dde6575ec5a6aa007caaf2174e7411ce1bbab14a0612c4fc2b052eae803
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b17466220585713a72b202d3760ccc634e0d5cf99696b0e80ef46e3bcd88a57a832dbbcb59d45bf5117bdc5809667a720c0a6c85322820484d2b0446ed40271
|
7
|
+
data.tar.gz: fa1128da178f0744ec2c07544fb316c28e8d8e58e2aa9dff6c8118f6dd4f0ed0ffb84ef3716f08366fef6d2b0f3e0d54023fe287b60a2eea6d0635e8cd74e61d
|
data/Gemfile.lock
CHANGED
data/exe/generate-test-session
CHANGED
@@ -31,7 +31,7 @@ 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',
|
34
|
+
opts.on('--pipeline-stages STAGES', String, 'Comma-separated list of pipeline stages to include in test session issue') do |pipeline_stages|
|
35
35
|
params[:pipeline_stages] = pipeline_stages.split(',')
|
36
36
|
end
|
37
37
|
|
@@ -6,19 +6,23 @@ module GitlabQuality
|
|
6
6
|
module TestTooling
|
7
7
|
module Concerns
|
8
8
|
module FindSetDri
|
9
|
-
def
|
9
|
+
def test_dri(product_group, stage, section)
|
10
10
|
parse_json_with_sets
|
11
|
+
fetch_section_sets(section)
|
11
12
|
fetch_stage_sets(stage)
|
12
|
-
|
13
|
-
return @sets.sample['username'] if @stage_sets.empty?
|
14
|
-
|
15
13
|
fetch_group_sets(product_group)
|
16
14
|
|
17
|
-
if @group_sets.
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
set_dris = if @group_sets.any?
|
16
|
+
@group_sets
|
17
|
+
elsif @stage_sets.any?
|
18
|
+
@stage_sets
|
19
|
+
elsif @section_sets.any?
|
20
|
+
@section_sets
|
21
|
+
else
|
22
|
+
@sets
|
23
|
+
end
|
24
|
+
|
25
|
+
set_dris.sample['username']
|
22
26
|
end
|
23
27
|
|
24
28
|
private
|
@@ -30,6 +34,14 @@ module GitlabQuality
|
|
30
34
|
@sets = JSON.parse(response.body).select { |user| user['role'].include?('software-engineer-in-test') }
|
31
35
|
end
|
32
36
|
|
37
|
+
def fetch_section_sets(section)
|
38
|
+
return if section.nil?
|
39
|
+
|
40
|
+
@section_sets = @sets.select do |user|
|
41
|
+
user['role'].include?(section.split("_").map(&:capitalize).join(" "))
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
33
45
|
def fetch_stage_sets(stage)
|
34
46
|
@stage_sets = @sets.select do |user|
|
35
47
|
user['role'].include?(stage.split("_").map(&:capitalize).join(" "))
|
@@ -328,7 +328,7 @@ module GitlabQuality
|
|
328
328
|
def new_issue_assignee_id(test)
|
329
329
|
return unless test.product_group?
|
330
330
|
|
331
|
-
dri =
|
331
|
+
dri = test_dri(test.product_group, test.stage, test.section)
|
332
332
|
puts " => Assigning #{dri} as DRI for the issue."
|
333
333
|
|
334
334
|
gitlab.find_user_id(username: dri)
|
@@ -17,6 +17,7 @@ module GitlabQuality
|
|
17
17
|
@existing_mrs = nil
|
18
18
|
@file_path = spec["file_path"]
|
19
19
|
testcase = spec["testcase"]
|
20
|
+
product_section = spec["section"]
|
20
21
|
devops_stage = spec["stage"]
|
21
22
|
product_group = spec["product_group"]
|
22
23
|
@example_name = spec["name"]
|
@@ -36,7 +37,7 @@ module GitlabQuality
|
|
36
37
|
#{"Promote to blocking: #{example_name}".truncate(72)}
|
37
38
|
COMMIT_MESSAGE
|
38
39
|
|
39
|
-
reviewer_id, assignee_handle = context.fetch_dri_id(product_group, devops_stage)
|
40
|
+
reviewer_id, assignee_handle = context.fetch_dri_id(product_group, devops_stage, product_section)
|
40
41
|
|
41
42
|
gitlab_bot_user_id = context.user_id_for_username(Runtime::Env.gitlab_bot_username)
|
42
43
|
|
@@ -190,8 +190,8 @@ module GitlabQuality
|
|
190
190
|
# @param [String] product_group
|
191
191
|
# @param [String] devops_stage
|
192
192
|
# @return [Array<Integer, String>]
|
193
|
-
def fetch_dri_id(product_group, devops_stage)
|
194
|
-
assignee_handle = ENV.fetch('QA_TEST_DRI_HANDLE', nil) ||
|
193
|
+
def fetch_dri_id(product_group, devops_stage, section)
|
194
|
+
assignee_handle = ENV.fetch('QA_TEST_DRI_HANDLE', nil) || test_dri(product_group, devops_stage, section)
|
195
195
|
|
196
196
|
[user_id_for_username(assignee_handle), assignee_handle]
|
197
197
|
end
|
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.19.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-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|