gitlab_quality-test_tooling 2.25.1 → 2.26.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gitlab_quality/test_tooling/code_coverage/click_house/category_owners_table.rb +18 -0
- data/lib/gitlab_quality/test_tooling/test_metrics_exporter/test_metrics.rb +2 -1
- data/lib/gitlab_quality/test_tooling/test_metrics_exporter/utils.rb +2 -1
- 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: 125bc8b9a38435053e2e82849dd2a41c241d05d47784626234f01702c5619671
|
|
4
|
+
data.tar.gz: 56255580e30a0fd8896a456e4f079bea4a8de9c2a363d73263dc641f613df786
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 041e97993894d0edc5d61c0e5e4c5bba688f81fdd92d6bec8d06e19787b3219daad4400d2aedc6c9da2a35e44f526bc8cc4960dce8016ad269f769be482c6ee5
|
|
7
|
+
data.tar.gz: eb2eef2912be06edf872af18ef1ff8ae1722462b694aa07f57f7a42e138ae8a0327aaa35914a778472e9104b9d08d407075026d2a48ac7ca9b0a5a9ad64944ad
|
data/Gemfile.lock
CHANGED
|
@@ -9,6 +9,8 @@ module GitlabQuality
|
|
|
9
9
|
class CategoryOwnersTable < GitlabQuality::TestTooling::CodeCoverage::ClickHouse::Table
|
|
10
10
|
TABLE_NAME = "category_owners"
|
|
11
11
|
|
|
12
|
+
MissingMappingError = Class.new(StandardError)
|
|
13
|
+
|
|
12
14
|
# Creates the ClickHouse table, if it doesn't exist already
|
|
13
15
|
# @return [nil]
|
|
14
16
|
def create
|
|
@@ -40,8 +42,24 @@ module GitlabQuality
|
|
|
40
42
|
logger.info("#{LOG_PREFIX} Successfully truncated table #{full_table_name}")
|
|
41
43
|
end
|
|
42
44
|
|
|
45
|
+
# Owners of particular category as group, stage and section
|
|
46
|
+
#
|
|
47
|
+
# @param category_name [String]
|
|
48
|
+
# @return [Hash]
|
|
49
|
+
def owners(category_name)
|
|
50
|
+
records.fetch(category_name)
|
|
51
|
+
rescue KeyError
|
|
52
|
+
raise(MissingMappingError, "Category '#{category_name}' not found in table '#{table_name}'")
|
|
53
|
+
end
|
|
54
|
+
|
|
43
55
|
private
|
|
44
56
|
|
|
57
|
+
def records
|
|
58
|
+
@records ||= client
|
|
59
|
+
.query("SELECT category, group, stage, section FROM #{table_name}")
|
|
60
|
+
.each_with_object({}) { |record, hsh| hsh[record["category"]] = record.slice("group", "stage", "section") }
|
|
61
|
+
end
|
|
62
|
+
|
|
45
63
|
# @return [Boolean] True if the record is valid, false otherwise
|
|
46
64
|
def valid_record?(record)
|
|
47
65
|
required_fields = %i[category group stage section]
|
|
@@ -67,7 +67,8 @@ module GitlabQuality
|
|
|
67
67
|
ci_pipeline_id: env('CI_PIPELINE_ID')&.to_i,
|
|
68
68
|
ci_merge_request_iid: (env('CI_MERGE_REQUEST_IID') || env('TOP_UPSTREAM_MERGE_REQUEST_IID'))&.to_i,
|
|
69
69
|
ci_branch: env("CI_COMMIT_REF_NAME"),
|
|
70
|
-
ci_target_branch: env("CI_MERGE_REQUEST_TARGET_BRANCH_NAME")
|
|
70
|
+
ci_target_branch: env("CI_MERGE_REQUEST_TARGET_BRANCH_NAME"),
|
|
71
|
+
ci_server_url: env("CI_SERVER_URL")
|
|
71
72
|
}
|
|
72
73
|
end
|
|
73
74
|
|
|
@@ -63,7 +63,7 @@ module GitlabQuality
|
|
|
63
63
|
location String,
|
|
64
64
|
quarantined Bool,
|
|
65
65
|
test_retried Bool,
|
|
66
|
-
feature_category LowCardinality(String) DEFAULT '',
|
|
66
|
+
feature_category LowCardinality(String) DEFAULT 'unknown',
|
|
67
67
|
run_type LowCardinality(String) DEFAULT 'unknown',
|
|
68
68
|
ci_project_id UInt32,
|
|
69
69
|
ci_job_name LowCardinality(String),
|
|
@@ -73,6 +73,7 @@ module GitlabQuality
|
|
|
73
73
|
ci_project_path LowCardinality(String),
|
|
74
74
|
ci_branch String,
|
|
75
75
|
ci_target_branch LowCardinality(String),
|
|
76
|
+
ci_server_url LowCardinality(String) DEFAULT 'https://gitlab.com',
|
|
76
77
|
exception_class String DEFAULT '',
|
|
77
78
|
failure_exception String DEFAULT ''
|
|
78
79
|
)
|
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: 2.
|
|
4
|
+
version: 2.26.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: 2025-
|
|
11
|
+
date: 2025-11-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: climate_control
|