gitlab-exporter 12.0.0 → 12.1.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/.ruby-version +1 -1
- data/Gemfile.lock +5 -5
- data/lib/gitlab_exporter/database/row_count.rb +3 -17
- data/lib/gitlab_exporter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c67811051d44f3c3e2fe6213eeb60f7a1c7997ddd2409008d52949cff5560fa
|
|
4
|
+
data.tar.gz: 0d750aef0b50d237783a09c22c35fdbcef0651a4998f6363cef2447786b9f8e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e60b685e6005754b165963ad218462875a80eb26aef8f5a01753fb90c138f6e98e2ceb13a43aea058487579c2a9068328611af78b01ba6b58a391cc0d0e84a0
|
|
7
|
+
data.tar.gz: 611b3b9f1a66a50e7754a27f16f8fbd12f143559607fa1a4097c252823ace586043d334df8ae2a6a7060a52adb01b24ff6978141267bdddb2dc9b595d8f004e1
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.7.
|
|
1
|
+
2.7.7
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
gitlab-exporter (12.
|
|
4
|
+
gitlab-exporter (12.1.0)
|
|
5
5
|
connection_pool (= 2.2.5)
|
|
6
6
|
faraday (~> 1.8.0)
|
|
7
7
|
pg (= 1.2.3)
|
|
@@ -48,8 +48,8 @@ GEM
|
|
|
48
48
|
puma (5.6.5)
|
|
49
49
|
nio4r (~> 2.0)
|
|
50
50
|
quantile (0.2.1)
|
|
51
|
-
rack (2.2.
|
|
52
|
-
rack-protection (2.2.
|
|
51
|
+
rack (2.2.5)
|
|
52
|
+
rack-protection (2.2.4)
|
|
53
53
|
rack
|
|
54
54
|
rainbow (3.0.0)
|
|
55
55
|
redis (4.4.0)
|
|
@@ -87,10 +87,10 @@ GEM
|
|
|
87
87
|
connection_pool (>= 2.2.2)
|
|
88
88
|
rack (~> 2.0)
|
|
89
89
|
redis (>= 4.2.0)
|
|
90
|
-
sinatra (2.2.
|
|
90
|
+
sinatra (2.2.4)
|
|
91
91
|
mustermann (~> 2.0)
|
|
92
92
|
rack (~> 2.2)
|
|
93
|
-
rack-protection (= 2.2.
|
|
93
|
+
rack-protection (= 2.2.4)
|
|
94
94
|
tilt (~> 2.0)
|
|
95
95
|
tilt (2.0.11)
|
|
96
96
|
unicode-display_width (1.7.0)
|
|
@@ -19,11 +19,6 @@ module GitLab
|
|
|
19
19
|
projects.mirror = true
|
|
20
20
|
AND projects.archived = false
|
|
21
21
|
AND project_mirror_data.retry_count <= 14
|
|
22
|
-
AND (
|
|
23
|
-
(projects.visibility_level = 20 AND root_namespaces.visibility_level = 20)
|
|
24
|
-
OR
|
|
25
|
-
plans.name IN ('early_adopter', 'bronze', 'silver', 'gold')
|
|
26
|
-
)
|
|
27
22
|
AND project_mirror_data.next_execution_timestamp > '2020-03-28'
|
|
28
23
|
SQL
|
|
29
24
|
|
|
@@ -31,15 +26,6 @@ module GitLab
|
|
|
31
26
|
select: :projects,
|
|
32
27
|
joins: <<~SQL,
|
|
33
28
|
INNER JOIN project_mirror_data ON project_mirror_data.project_id = projects.id
|
|
34
|
-
INNER JOIN namespaces AS root_namespaces ON root_namespaces.id = (
|
|
35
|
-
WITH RECURSIVE "base_and_ancestors" AS (
|
|
36
|
-
(SELECT "namespaces".* FROM "namespaces" WHERE "namespaces"."id" = projects.namespace_id)
|
|
37
|
-
UNION
|
|
38
|
-
(SELECT "namespaces".* FROM "namespaces", "base_and_ancestors" WHERE "namespaces"."id" = "base_and_ancestors"."parent_id")
|
|
39
|
-
) SELECT "namespaces".id FROM "base_and_ancestors" AS "namespaces" WHERE "namespaces"."parent_id" IS NULL
|
|
40
|
-
)
|
|
41
|
-
LEFT JOIN gitlab_subscriptions ON gitlab_subscriptions.namespace_id = root_namespaces.id
|
|
42
|
-
LEFT JOIN plans ON plans.id = gitlab_subscriptions.hosted_plan_id
|
|
43
29
|
SQL
|
|
44
30
|
check: "SELECT 1 FROM information_schema.tables WHERE table_name='plans'"
|
|
45
31
|
}.freeze
|
|
@@ -192,21 +178,21 @@ module GitLab
|
|
|
192
178
|
select: :container_repositories,
|
|
193
179
|
where: <<~SQL
|
|
194
180
|
migration_state = 'pre_importing'
|
|
195
|
-
AND (COALESCE(migration_pre_import_started_at,
|
|
181
|
+
AND (COALESCE(migration_pre_import_started_at, TO_TIMESTAMP(0)) < (now() - INTERVAL '20 minutes'))
|
|
196
182
|
SQL
|
|
197
183
|
},
|
|
198
184
|
container_repositories_stalled_pre_import_done: {
|
|
199
185
|
select: :container_repositories,
|
|
200
186
|
where: <<~SQL
|
|
201
187
|
migration_state = 'pre_import_done'
|
|
202
|
-
AND (COALESCE(migration_pre_import_done_at,
|
|
188
|
+
AND (COALESCE(migration_pre_import_done_at, TO_TIMESTAMP(0)) < (now() - INTERVAL '5 minutes'))
|
|
203
189
|
SQL
|
|
204
190
|
},
|
|
205
191
|
container_repositories_stalled_importing: {
|
|
206
192
|
select: :container_repositories,
|
|
207
193
|
where: <<~SQL
|
|
208
194
|
migration_state = 'importing'
|
|
209
|
-
AND (COALESCE(migration_import_started_at,
|
|
195
|
+
AND (COALESCE(migration_import_started_at, TO_TIMESTAMP(0)) < (now() - INTERVAL '5 minutes'))
|
|
210
196
|
SQL
|
|
211
197
|
},
|
|
212
198
|
container_repositories_skipped_not_in_plan: {
|