gitlab_quality-test_tooling 3.22.0 → 3.22.1

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: a2bfb7b97e0b3a58ac7cbf7cc5f4ab8eb49bf3bf117fce216a34996ed4b4e471
4
- data.tar.gz: 93b21c6cf0608d72292514aa34770db9f7402813ac6b0aeafc383b74f48202b9
3
+ metadata.gz: 753fbf9038d32ba4c43b76dbeac70b9a7bec17cd58e62b92f1c6c6279c1105a6
4
+ data.tar.gz: 6d10b736a6a40453ccc70edce8aad4c360a50df4d27a662cde93d38fd107de59
5
5
  SHA512:
6
- metadata.gz: b58cd4d33e53fccf07cd9ca8a1113f0e93a50f33a2217f46c50c3d4ec3e5a1e2f777fbd5546ec20813385a913e989f29b56fbb936be7a5b0bff1fe4f2ffd9231
7
- data.tar.gz: 06a62a7194ebbdc04483a4691eef617c3e2d82d553851f82430ddef4634c0a53f1cb4d3e8cda82fb648bc57ef6a2dda581e4c774cc3eacb622473d7c86d6466d
6
+ metadata.gz: 54cd62d62cbcb29923e63ebafeccfa3911086a37220a59b16efe2d2b652587c598731360a827f79a27fe0a92f8e702c4943b3e03810c8e51ac1052d6a7bacba3
7
+ data.tar.gz: 2991e98253c031c1cf0d98e04178d09c53f4c331e1b23c244e567cfcb79552da6c104f91fb3ad42c23284f0654bb192367823e7159db2c06c7aaa5d387c3757d
data/Gemfile.lock CHANGED
@@ -1,9 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab_quality-test_tooling (3.22.0)
4
+ gitlab_quality-test_tooling (3.22.1)
5
5
  activesupport (>= 7.0)
6
6
  amatch (~> 0.4.1)
7
+ csv (~> 3.0)
7
8
  fog-google (~> 1.25)
8
9
  gitlab (>= 4.19, < 7.0)
9
10
  http (~> 5.0)
@@ -398,8 +399,8 @@ GEM
398
399
  diff-lcs (~> 1.3)
399
400
  parser (>= 3.3.0)
400
401
  uri (0.13.1)
401
- webmock (3.7.0)
402
- addressable (>= 2.3.6)
402
+ webmock (3.26.4)
403
+ addressable (>= 2.8.0)
403
404
  crack (>= 0.3.2)
404
405
  hashdiff (>= 0.4.0, < 2.0.0)
405
406
  yard (0.9.37)
@@ -425,7 +426,7 @@ DEPENDENCIES
425
426
  simplecov-cobertura (~> 2.1)
426
427
  solargraph (~> 0.41)
427
428
  timecop (~> 0.9.5)
428
- webmock (= 3.7.0)
429
+ webmock (= 3.26.4)
429
430
 
430
431
  BUNDLED WITH
431
432
  2.7.2
@@ -9,9 +9,10 @@
9
9
  -- Parameters use `{name}` braces, substituted as literal text by gsub in
10
10
  -- TestHealthRiskAggregator#build_sql after validation. A typoed placeholder
11
11
  -- silently survives gsub, so match the names exactly.
12
- -- {snapshot_date} date stamp for this run
13
- -- {coverage_start} day of the most recent full per-test capture
14
- -- {risk_window} quarantine/flaky lookback, default '30 DAY'
12
+ -- {snapshot_date} date stamp for this run
13
+ -- {coverage_start} day of the most recent full per-test capture
14
+ -- {risk_window} flaky and ownership lookback, default '30 DAY'
15
+ -- {quarantine_window} default-branch quarantine lookback, fixed at '3 DAY'
15
16
  --
16
17
  -- The INSERT is unconditional. Idempotency comes from the target table's
17
18
  -- ReplacingMergeTree(version) engine keyed by the row tuple: re-runs and
@@ -26,17 +27,16 @@
26
27
  INSERT INTO code_coverage.test_health_risk_per_group
27
28
  WITH
28
29
  quarantine_status AS (
29
- -- `date` is the daily aggregation timestamp on the test_metrics summary
30
- -- view (when the per-test counts were rolled up), not the date a test
31
- -- entered quarantine. We treat any test marked quarantined within the
32
- -- risk window as currently quarantined.
33
- SELECT
34
- test_file,
35
- uniqIfMerge(quarantined_cases) > 0 AS is_quarantined
36
- FROM test_metrics.test_file_quarantine_summary
37
- WHERE date >= now() - INTERVAL {risk_window}
38
- GROUP BY test_file
39
- HAVING is_quarantined
30
+ -- The same source and window the Quarantine score counts from, so both
31
+ -- agree on which specs are quarantined. The MV keeps default-branch
32
+ -- pipelines only; test_file_quarantine_summary also counts stable-branch
33
+ -- and backport pipelines, which keep a spec quarantined long after master
34
+ -- has fixed it.
35
+ SELECT DISTINCT
36
+ file_path AS test_file,
37
+ TRUE AS is_quarantined
38
+ FROM test_metrics.quarantined_tests_hourly_mv
39
+ WHERE hour_timestamp >= now() - INTERVAL {quarantine_window}
40
40
  ),
41
41
  flaky_status AS (
42
42
  SELECT
@@ -39,6 +39,8 @@ module GitlabQuality
39
39
  # denominator built from sparse data.
40
40
  DEFAULT_ANCHOR_LOOKBACK = '21 DAY'
41
41
  DEFAULT_RISK_WINDOW = '30 DAY'
42
+ # Must match the Quarantine score's window in the runbooks Test Health views.
43
+ QUARANTINE_WINDOW = '3 DAY'
42
44
 
43
45
  # `snapshot_date` is YYYY-MM-DD; intervals are `<integer> <unit>`
44
46
  # (singular or plural).
@@ -126,6 +128,7 @@ module GitlabQuality
126
128
  .gsub('{snapshot_date}', validate_date(snapshot_date))
127
129
  .gsub('{coverage_start}', coverage_start)
128
130
  .gsub('{risk_window}', validate_interval(risk_window))
131
+ .gsub('{quarantine_window}', QUARANTINE_WINDOW)
129
132
  end
130
133
 
131
134
  # DateTime/Time `to_s` includes the time portion and is rejected.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitlabQuality
4
4
  module TestTooling
5
- VERSION = "3.22.0"
5
+ VERSION = "3.22.1"
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.22.0
4
+ version: 3.22.1
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-09-09 00:00:00.000000000 Z
11
+ date: 2026-10-07 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.7.0
215
+ version: 3.26.4
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.7.0
222
+ version: 3.26.4
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: activesupport
225
225
  requirement: !ruby/object:Gem::Requirement
@@ -248,6 +248,20 @@ dependencies:
248
248
  - - "~>"
249
249
  - !ruby/object:Gem::Version
250
250
  version: 0.4.1
251
+ - !ruby/object:Gem::Dependency
252
+ name: csv
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '3.0'
258
+ type: :runtime
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: '3.0'
251
265
  - !ruby/object:Gem::Dependency
252
266
  name: fog-google
253
267
  requirement: !ruby/object:Gem::Requirement