gitlab-exporter 12.0.1 → 12.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +5 -5
- data/lib/gitlab_exporter/database/row_count.rb +0 -14
- 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.0
|
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
|