gitlab_quality-test_tooling 3.21.1 → 3.21.3

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: cbd765eef13187839210bb0dde07988168415170236b8734d3faf396ce95b9a9
4
- data.tar.gz: '0877e97fd029bdb06028dad82aeae1a15f18b73e3f8ad2ad9c0448819335ca71'
3
+ metadata.gz: 200252eb5e20a931ca64bd835400572bc3f059428834a377fce3edce25cdfbfc
4
+ data.tar.gz: aa0a9707d616d5c8a86736ddada7f65721ffc7ea7f37b80ab69c41c1e62ec5c3
5
5
  SHA512:
6
- metadata.gz: f242e07dbdefd766fd8f2bec91b779c93bf68f91a913314982b8e3053db99704fa0330cb31dadeb8829c570f43b7f2f04c52265fcdd75cc1beb60f1486096554
7
- data.tar.gz: b6cd28e7ad33b233fb6f7c68db39ade7b72118913eac8e3b3281e018d59a9e9e5ca99b50a7730d28f189b5a2517c2c933e254d15f7a50cff6800476346aa4b37
6
+ metadata.gz: 439bd19bf631d9f9416acbefd77ae5ebad551ff2a06840527c2b5af0072d481b98cf89a42565e98165f2b78a2bfcf484f22826a202ce3b8f7cdaf4e19e48db14
7
+ data.tar.gz: 1af8b9ed7eee499fb9c9ac09d2a697da53e3d608944799070c7ec40e5078ff4c96bc7cf15b6487cedc7e3402e799c57f3448ebcbc71feb988a28184cdbc7fef6
data/Gemfile CHANGED
@@ -4,3 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in gitlab_quality-test_tooling.gemspec
6
6
  gemspec
7
+
8
+ # excon >= 1.7 requires Ruby >= 3.3; cap until we drop Ruby 3.2 support
9
+ gem "excon", "< 1.7"
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab_quality-test_tooling (3.21.1)
4
+ gitlab_quality-test_tooling (3.21.3)
5
5
  activesupport (>= 7.0)
6
6
  amatch (~> 0.4.1)
7
- fog-google (~> 1.24, >= 1.24.1)
7
+ fog-google (~> 1.25)
8
8
  gitlab (>= 4.19, < 7.0)
9
9
  http (~> 5.0)
10
10
  http-cookie (>= 1.0, < 1.1.1)
@@ -80,7 +80,8 @@ GEM
80
80
  domain_name (0.6.20240107)
81
81
  drb (2.2.1)
82
82
  e2mmap (0.1.0)
83
- excon (0.112.0)
83
+ excon (1.6.0)
84
+ logger
84
85
  faraday (2.12.0)
85
86
  faraday-net_http (>= 2.0, < 3.4)
86
87
  json
@@ -93,14 +94,14 @@ GEM
93
94
  ffi-compiler (1.3.2)
94
95
  ffi (>= 1.15.5)
95
96
  rake
96
- fog-core (2.4.0)
97
+ fog-core (2.6.0)
97
98
  builder
98
- excon (~> 0.71)
99
+ excon (~> 1.0)
99
100
  formatador (>= 0.2, < 2.0)
100
101
  mime-types
101
- fog-google (1.24.1)
102
+ fog-google (1.29.4)
102
103
  addressable (>= 2.7.0)
103
- fog-core (< 2.5)
104
+ fog-core (~> 2.5)
104
105
  fog-json (~> 1.2)
105
106
  fog-xml (~> 0.1.0)
106
107
  google-apis-compute_v1 (~> 0.53)
@@ -409,6 +410,7 @@ PLATFORMS
409
410
 
410
411
  DEPENDENCIES
411
412
  climate_control (~> 1.2)
413
+ excon (< 1.7)
412
414
  gitlab-dangerfiles (~> 3.8)
413
415
  gitlab-styles (~> 13.1)
414
416
  gitlab_quality-test_tooling!
@@ -15,8 +15,10 @@ module GitlabQuality
15
15
 
16
16
  KNOWN_UNOWNED = %w[shared not_owned tooling].freeze
17
17
 
18
- # SQL query to get the latest ownership record for each unique category+ownership combination
19
- # Partitions by the full composite key to handle cases where a category has multiple ownerships
18
+ # Every owner a category has ever had, including ones it has moved off, one row per
19
+ # distinct owner and in no particular order. Only `push` reads this, to skip rows it
20
+ # has already stored. Deduping to one row per category here would make it re-insert
21
+ # old owners on every run.
20
22
  LATEST_RECORDS_QUERY = <<~SQL
21
23
  SELECT category, group, stage, section
22
24
  FROM (
@@ -27,6 +29,18 @@ module GitlabQuality
27
29
  WHERE rn = 1
28
30
  SQL
29
31
 
32
+ # The current owner of each category, one row per category, which is what `owners`
33
+ # and `owner_records` serve to callers. The table keeps every past owner as well, so
34
+ # the newest timestamp is what picks the current one. The owner columns after the
35
+ # timestamp in the ORDER BY break ties, so two rows sharing a category's newest
36
+ # timestamp always resolve the same way.
37
+ LATEST_OWNERS_QUERY = <<~SQL
38
+ SELECT category, group, stage, section
39
+ FROM %{table_name}
40
+ ORDER BY category, timestamp DESC, group, stage, section
41
+ LIMIT 1 BY category
42
+ SQL
43
+
30
44
  # Insert only new category ownership records that don't already exist
31
45
  # This avoids needing TRUNCATE permission
32
46
  def push(data)
@@ -71,7 +85,7 @@ module GitlabQuality
71
85
  private
72
86
 
73
87
  def records
74
- @records ||= fetch_latest_records.each_with_object({}) do |record, hsh|
88
+ @records ||= fetch_latest_owners.each_with_object({}) do |record, hsh|
75
89
  hsh[record["category"]] = record.slice("group", "stage", "section")
76
90
  end
77
91
  end
@@ -114,6 +128,11 @@ module GitlabQuality
114
128
  client.query(query)
115
129
  end
116
130
 
131
+ def fetch_latest_owners
132
+ query = format(LATEST_OWNERS_QUERY, table_name: table_name)
133
+ client.query(query)
134
+ end
135
+
117
136
  def sanitized_data_record(record)
118
137
  {
119
138
  timestamp: time,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitlabQuality
4
4
  module TestTooling
5
- VERSION = "3.21.1"
5
+ VERSION = "3.21.3"
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.21.1
4
+ version: 3.21.3
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-08-26 00:00:00.000000000 Z
11
+ date: 2026-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -254,20 +254,14 @@ dependencies:
254
254
  requirements:
255
255
  - - "~>"
256
256
  - !ruby/object:Gem::Version
257
- version: '1.24'
258
- - - ">="
259
- - !ruby/object:Gem::Version
260
- version: 1.24.1
257
+ version: '1.25'
261
258
  type: :runtime
262
259
  prerelease: false
263
260
  version_requirements: !ruby/object:Gem::Requirement
264
261
  requirements:
265
262
  - - "~>"
266
263
  - !ruby/object:Gem::Version
267
- version: '1.24'
268
- - - ">="
269
- - !ruby/object:Gem::Version
270
- version: 1.24.1
264
+ version: '1.25'
271
265
  - !ruby/object:Gem::Dependency
272
266
  name: gitlab
273
267
  requirement: !ruby/object:Gem::Requirement