gitlab-exporter 12.0.0 → 12.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca354fcfa5a8bde34e45a37610546ed70135c1a9208e92f2986c1811ddf9bf26
4
- data.tar.gz: fc584b756b3032c31d758271d603df84104821be727b4fce50b23f7cf5488185
3
+ metadata.gz: 7c67811051d44f3c3e2fe6213eeb60f7a1c7997ddd2409008d52949cff5560fa
4
+ data.tar.gz: 0d750aef0b50d237783a09c22c35fdbcef0651a4998f6363cef2447786b9f8e1
5
5
  SHA512:
6
- metadata.gz: 4f199b0d85a71d607023bb39e2d16d8aec6fff0506ea151b5358c1ce374d34e0ae91ad1eb70079da22ca8ba726b3f4d758517623a00bfa5bef8b72e97b5c2f2d
7
- data.tar.gz: 76bcce5399be29898662aa0cb067d1285bf41c1a2286380b835924aeac0b8d3577b874ad943f080c6a93076715e1e32a7172d28e8c06e7b929766faf561cd7d6
6
+ metadata.gz: 5e60b685e6005754b165963ad218462875a80eb26aef8f5a01753fb90c138f6e98e2ceb13a43aea058487579c2a9068328611af78b01ba6b58a391cc0d0e84a0
7
+ data.tar.gz: 611b3b9f1a66a50e7754a27f16f8fbd12f143559607fa1a4097c252823ace586043d334df8ae2a6a7060a52adb01b24ff6978141267bdddb2dc9b595d8f004e1
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.4
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.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.4)
52
- rack-protection (2.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.2)
90
+ sinatra (2.2.4)
91
91
  mustermann (~> 2.0)
92
92
  rack (~> 2.2)
93
- rack-protection (= 2.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, '01-01-1970') < (now() - INTERVAL '20 minutes'))
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, '01-01-1970') < (now() - INTERVAL '5 minutes'))
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, '01-01-1970') < (now() - INTERVAL '5 minutes'))
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: {
@@ -1,5 +1,5 @@
1
1
  module GitLab
2
2
  module Exporter
3
- VERSION = "12.0.0".freeze
3
+ VERSION = "12.1.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.0.0
4
+ version: 12.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Carranza