gitlab_quality-test_tooling 3.21.2 → 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 200252eb5e20a931ca64bd835400572bc3f059428834a377fce3edce25cdfbfc
|
|
4
|
+
data.tar.gz: aa0a9707d616d5c8a86736ddada7f65721ffc7ea7f37b80ab69c41c1e62ec5c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 439bd19bf631d9f9416acbefd77ae5ebad551ff2a06840527c2b5af0072d481b98cf89a42565e98165f2b78a2bfcf484f22826a202ce3b8f7cdaf4e19e48db14
|
|
7
|
+
data.tar.gz: 1af8b9ed7eee499fb9c9ac09d2a697da53e3d608944799070c7ec40e5078ff4c96bc7cf15b6487cedc7e3402e799c57f3448ebcbc71feb988a28184cdbc7fef6
|
data/Gemfile.lock
CHANGED
|
@@ -15,8 +15,10 @@ module GitlabQuality
|
|
|
15
15
|
|
|
16
16
|
KNOWN_UNOWNED = %w[shared not_owned tooling].freeze
|
|
17
17
|
|
|
18
|
-
#
|
|
19
|
-
#
|
|
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 ||=
|
|
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,
|
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.
|
|
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-09-
|
|
11
|
+
date: 2026-09-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: climate_control
|