gitlab_quality-test_tooling 3.23.2 → 3.24.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29d0d651f4a6124b15e28a2800326169ac564f24dd3e28bd006ae90ff89eaf59
4
- data.tar.gz: 9fd40df7ec874c8784dc1859125483b8af11578ac589898a616dd74930ed504f
3
+ metadata.gz: c956e87dc3008743deaa1a7f055985f519e9df218947202441b9ccd51e953c23
4
+ data.tar.gz: 27de690c8a72d42eb13f25d4a1fb47ca69f7f92e2307d3d9c4dd6d99e74a372f
5
5
  SHA512:
6
- metadata.gz: dd9575af1e50ccc41c5c75f7d6a11b899a4d5ed8540eac8e3ec9d9db8d20ba937c0b8f4424a62d39f43b0795374b41da38d18a1e7a083412297c2f570bf45b25
7
- data.tar.gz: e0b7ba73f98a35bdc037c35239c1b28c329c15862fbf976b1ec49aad3c4cdf660cd77aa3b5cbfdc4b618edb8cf54d0c7e20a7e0b5ba8ed08d581d4b12121a76e
6
+ metadata.gz: fade4d00a5ea323b19b414341c2dec2fff236c57b692b237d29b95870ff30636be016574be7cef1c3430715593d7fee91e963ad489ff3b0a96c7223cdd4c364f
7
+ data.tar.gz: c1879f486b57c39311ce17660fb685efbdbc6f58efacb1e731477401252435ddb0e9cd30dcd3c336ad97bedc652f8a1264f65c410716c77d9df4e294ca2e4b08
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab_quality-test_tooling (3.23.2)
4
+ gitlab_quality-test_tooling (3.24.0)
5
5
  activesupport (>= 7.0)
6
6
  amatch (~> 0.4.1)
7
7
  csv (~> 3.0)
@@ -409,7 +409,7 @@ GEM
409
409
  diff-lcs (~> 1.3)
410
410
  parser (>= 3.3.0)
411
411
  uri (1.1.1)
412
- webmock (3.26.4)
412
+ webmock (3.40.0)
413
413
  addressable (>= 2.8.0)
414
414
  crack (>= 0.3.2)
415
415
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -436,7 +436,7 @@ DEPENDENCIES
436
436
  simplecov-cobertura (~> 2.1)
437
437
  solargraph (~> 0.41)
438
438
  timecop (~> 0.9.5)
439
- webmock (= 3.26.4)
439
+ webmock (= 3.40.0)
440
440
 
441
441
  BUNDLED WITH
442
442
  2.7.2
@@ -48,32 +48,45 @@ WITH
48
48
  HAVING is_flaky
49
49
  ),
50
50
  test_ownership AS (
51
- -- Authoritative test-file ownership from test_metrics, which resolves
52
- -- feature_category to group/stage/section from a current source. The
53
- -- per-test coverage export's own CategoryOwners mapping is stale (it fetches
54
- -- a dated stages.yml), so many rows arrive with a blank group; this is the
55
- -- fallback. argMax pins the latest ownership per file over the risk window.
51
+ -- One owner per test file: the group of the owned category most of its
52
+ -- examples declare. Crediting every category's group instead lets a few
53
+ -- broad specs dominate the risk of dozens of groups. A real group beats
54
+ -- the shared, tooling and not_owned catch-alls whatever the counts. On a
55
+ -- tie the alphabetically last category wins, so the pick is stable.
56
+ -- examples keeps counting for as long as a category is in use, so only
57
+ -- categories seen within the risk window vote. Otherwise a category
58
+ -- removed from a spec outvotes its replacement on old runs alone.
56
59
  SELECT
57
- file_path,
58
- argMax(`group`, timestamp) AS owner_group,
59
- argMax(stage, timestamp) AS owner_stage,
60
- argMax(section, timestamp) AS owner_section
61
- FROM test_metrics.test_results
62
- WHERE timestamp >= now() - INTERVAL {risk_window}
63
- AND `group` NOT IN ('', 'unknown')
64
- GROUP BY file_path
60
+ tfc.ci_project_path AS ci_project_path,
61
+ tfc.file_path AS file_path,
62
+ argMax(co.`group`, (tfc.feature_category NOT IN ('shared', 'tooling', 'not_owned'), tfc.examples, tfc.feature_category)) AS owner_group,
63
+ argMax(co.stage, (tfc.feature_category NOT IN ('shared', 'tooling', 'not_owned'), tfc.examples, tfc.feature_category)) AS owner_stage,
64
+ argMax(co.section, (tfc.feature_category NOT IN ('shared', 'tooling', 'not_owned'), tfc.examples, tfc.feature_category)) AS owner_section
65
+ FROM (
66
+ SELECT ci_project_path, file_path, feature_category, sum(examples) AS examples
67
+ FROM test_metrics.test_file_categories
68
+ GROUP BY ci_project_path, file_path, feature_category
69
+ HAVING max(last_seen) >= now() - INTERVAL {risk_window}
70
+ ) tfc
71
+ INNER JOIN (
72
+ -- category_owners keeps every past owner of a category; use the newest.
73
+ SELECT category, `group`, stage, section
74
+ FROM shared.category_owners
75
+ ORDER BY category, timestamp DESC, `group`, stage, section
76
+ LIMIT 1 BY category
77
+ ) co ON co.category = tfc.feature_category
78
+ GROUP BY tfc.ci_project_path, tfc.file_path
65
79
  ),
66
80
  per_test_status AS (
67
81
  SELECT
68
82
  tc.source_file AS source_file,
69
- -- Fall back to test_metrics ownership when the coverage row has no group
70
- -- (stale CategoryOwners mapping). Resolve all three off the same condition
71
- -- so the team stays internally consistent. Alias the passthrough columns to
72
- -- bare names too: the analyzer otherwise keeps the `tc.` qualifier once the
73
- -- ownership join is in play, and per_file references them unqualified.
74
- if(tc.`group` != '', tc.`group`, own.owner_group) AS `group`,
75
- if(tc.`group` != '', tc.stage, own.owner_stage) AS stage,
76
- if(tc.`group` != '', tc.section, own.owner_section) AS section,
83
+ -- A file with no category matches no ownership row and keeps the blank
84
+ -- group. Alias the passthrough columns to bare names: the analyzer
85
+ -- otherwise keeps the `tc.` qualifier once the ownership join is in
86
+ -- play, and per_file references them unqualified.
87
+ own.owner_group AS `group`,
88
+ own.owner_stage AS stage,
89
+ own.owner_section AS section,
77
90
  tc.total_lines AS total_lines,
78
91
  tc.covered_lines AS covered_lines,
79
92
  -- Jest quarantine is a flat list (quarantined_vue3_specs.txt), loaded into
@@ -84,7 +97,7 @@ WITH
84
97
  FROM code_coverage.test_coverage_per_file tc FINAL
85
98
  LEFT JOIN quarantine_status qs ON qs.test_file = tc.test_file
86
99
  LEFT JOIN flaky_status fs ON fs.test_file = tc.test_file
87
- LEFT JOIN test_ownership own ON own.file_path = tc.test_file
100
+ LEFT JOIN test_ownership own ON own.ci_project_path = tc.ci_project_path AND own.file_path = tc.test_file
88
101
  WHERE tc.timestamp >= toDate('{coverage_start}')
89
102
  ),
90
103
  per_file AS (
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitlabQuality
4
4
  module TestTooling
5
- VERSION = "3.23.2"
5
+ VERSION = "3.24.0"
6
6
  end
7
7
  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: 3.23.2
4
+ version: 3.24.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: 2026-11-23 00:00:00.000000000 Z
11
+ date: 2026-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -212,14 +212,14 @@ dependencies:
212
212
  requirements:
213
213
  - - '='
214
214
  - !ruby/object:Gem::Version
215
- version: 3.26.4
215
+ version: 3.40.0
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - '='
221
221
  - !ruby/object:Gem::Version
222
- version: 3.26.4
222
+ version: 3.40.0
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: activesupport
225
225
  requirement: !ruby/object:Gem::Requirement