gitlab_quality-test_tooling 2.21.0 → 2.22.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/report/report_as_issue.rb +0 -1
- data/lib/gitlab_quality/test_tooling/test_metrics_exporter/formatter.rb +9 -5
- data/lib/gitlab_quality/test_tooling/test_metrics_exporter/test_metrics.rb +3 -2
- 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: 9bc3f79d2fd78c6d8fd1ee931c50f126e8aa2c91a0608b6e3675605fffa5dd5e
|
4
|
+
data.tar.gz: a80d4658c0781ec47d880b6dbf0166eb97f64742ce4e468ef86f9bc3e1e7615c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb3d6fde7d83295c03059558525e6e4722416cd87dcf5e8a72c0b8f673dc384e08012d18aaed88877febd22cd400f039a24fb977ebbba985d0774e940b12f24e
|
7
|
+
data.tar.gz: 4cd6cee22b30f7cc1bd6c6291f55c0ba6026d4688b04c00b054cbcb3598054e8a5f696758b7e23adad1853ae9222802ebe22179baea96027be0b88a4598d5b5b
|
data/Gemfile.lock
CHANGED
@@ -104,7 +104,6 @@ module GitlabQuality
|
|
104
104
|
description: new_issue_description(test),
|
105
105
|
labels: new_issue_labels(test).to_a,
|
106
106
|
issue_type: issue_type,
|
107
|
-
assignee_id: new_issue_assignee_id(test),
|
108
107
|
due_date: new_issue_due_date(test),
|
109
108
|
confidential: confidential
|
110
109
|
}.compact
|
@@ -8,15 +8,19 @@ module GitlabQuality
|
|
8
8
|
class Formatter < RSpec::Core::Formatters::BaseFormatter
|
9
9
|
include Utils
|
10
10
|
|
11
|
-
RSpec::Core::Formatters.register(self,
|
11
|
+
RSpec::Core::Formatters.register(self, :start, :stop)
|
12
12
|
|
13
13
|
LOG_PREFIX = "[MetricsExporter]"
|
14
14
|
|
15
15
|
def start(_notification)
|
16
|
-
|
17
|
-
|
16
|
+
return unless config.initial_run
|
17
|
+
|
18
|
+
logger.info("#{LOG_PREFIX} Running initial setup for metrics export")
|
19
|
+
raise "Initial setup is enabled, but clickhouse configuration is missing!" unless clickhouse_config
|
18
20
|
|
19
21
|
create_clickhouse_metrics_table
|
22
|
+
rescue StandardError => e
|
23
|
+
logger.error("#{LOG_PREFIX} Error occurred during initial setup: #{e.message}")
|
20
24
|
end
|
21
25
|
|
22
26
|
def stop(notification)
|
@@ -38,12 +42,12 @@ module GitlabQuality
|
|
38
42
|
|
39
43
|
# Single common timestamp for all exported example metrics to keep data points consistently grouped
|
40
44
|
#
|
41
|
-
# @return [
|
45
|
+
# @return [String]
|
42
46
|
def time
|
43
47
|
return @time if @time
|
44
48
|
|
45
49
|
ci_created_at = Runtime::Env.ci_pipeline_created_at
|
46
|
-
@time = ci_created_at ? Time.strptime(ci_created_at, '%Y-%m-%dT%H:%M:%S%z') : Time.now.utc
|
50
|
+
@time = (ci_created_at ? Time.strptime(ci_created_at, '%Y-%m-%dT%H:%M:%S%z') : Time.now.utc).strftime('%Y-%m-%dT%H:%M:%S.%6N')
|
47
51
|
end
|
48
52
|
|
49
53
|
# Push data to gcs
|
@@ -16,7 +16,7 @@ module GitlabQuality
|
|
16
16
|
# @return [Hash]
|
17
17
|
def data
|
18
18
|
{
|
19
|
-
|
19
|
+
timestamp: timestamp,
|
20
20
|
**rspec_metrics,
|
21
21
|
**ci_metrics,
|
22
22
|
**custom_metrics
|
@@ -50,7 +50,8 @@ module GitlabQuality
|
|
50
50
|
failure_exception: failure_exception,
|
51
51
|
quarantined: quarantined?,
|
52
52
|
feature_category: example.metadata[:feature_category] || "",
|
53
|
-
test_retried: config.test_retried_proc.call(example)
|
53
|
+
test_retried: config.test_retried_proc.call(example),
|
54
|
+
run_type: run_type
|
54
55
|
}
|
55
56
|
end
|
56
57
|
|
@@ -64,6 +64,7 @@ module GitlabQuality
|
|
64
64
|
quarantined Bool,
|
65
65
|
test_retried Bool,
|
66
66
|
feature_category LowCardinality(String) DEFAULT '',
|
67
|
+
run_type LowCardinality(String) DEFAULT 'unknown',
|
67
68
|
ci_project_id UInt32,
|
68
69
|
ci_job_name LowCardinality(String),
|
69
70
|
ci_job_id UInt64,
|
@@ -77,7 +78,7 @@ module GitlabQuality
|
|
77
78
|
)
|
78
79
|
ENGINE = MergeTree()
|
79
80
|
PARTITION BY toYYYYMM(timestamp)
|
80
|
-
ORDER BY (ci_project_path, timestamp, status, feature_category, file_path, ci_pipeline_id)
|
81
|
+
ORDER BY (ci_project_path, timestamp, run_type, status, feature_category, file_path, ci_pipeline_id)
|
81
82
|
SETTINGS index_granularity = 8192;
|
82
83
|
SQL
|
83
84
|
return if config.extra_metadata_columns.empty?
|
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.22.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-10-
|
11
|
+
date: 2025-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|