gitlab-exporter 13.4.1 → 13.5.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: 5841c9c02dc87806b53fd5bb4087dfcc63f1a249f9b47f178bb765401d02e6e4
4
- data.tar.gz: f4ef520597e0c4feb314f6579639da75fd0c61d641048a60c4facb1db6441fc4
3
+ metadata.gz: 71244a8992a3116e4513746514842e6d6f0c53abbef7e0a7435a3889acce66c1
4
+ data.tar.gz: fc013ec18e7f7a11e3d5da3a1375fe80add92f96da1f572eb8b577ee98bedebb
5
5
  SHA512:
6
- metadata.gz: 8631a32ce6cbf2c2d74ac46cf5646635bc3e3fb4dbc8a1556b6e47a00e128bd12e248c29eaafb9719e171a1c1dc6e6b4f62ccdcb3bf1478216e5a5a5dadf0b40
7
- data.tar.gz: ebe1e65ff91911c749650fa59e0e84229740d3fe251bd448a571cb8ce0e23ee6bf6a788656b91e6de870f0e6b2ef58dd349e7fe0e0db49728d2f1531408804e1
6
+ metadata.gz: b4d3c84092ca842c13123bb6573118adc44b60f090594db51b559bc20d2718c1e8a341494fd6ba376e6a30ce07985b2ae88923e7a68760a631936f3e962ed62f
7
+ data.tar.gz: eb579c03705bdbd4d64b5c0a5b6dc40cbfa0125939b03d250d6efe44f395fe55effabbf3733ab57a0297494530ce8efc5b3521eda12c930b7ec8ffeadc8fb7b0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-exporter (13.4.1)
4
+ gitlab-exporter (13.5.0)
5
5
  connection_pool (= 2.2.5)
6
6
  faraday (~> 1.8.0)
7
7
  pg (= 1.5.3)
@@ -9,27 +9,27 @@ module GitLab
9
9
  <<~SQL.freeze
10
10
  SELECT
11
11
  projects.namespace_id,
12
- ci_builds.status,
12
+ p_ci_builds.status,
13
13
  projects.shared_runners_enabled,
14
14
  (COALESCE(namespaces.shared_runners_minutes_limit, application_settings.shared_runners_minutes, 0) = 0 OR
15
15
  COALESCE(namespace_statistics.shared_runners_seconds, 0) < COALESCE(namespaces.shared_runners_minutes_limit, application_settings.shared_runners_minutes, 0) * 60) as has_minutes,
16
16
  COUNT(*) AS count
17
- FROM ci_builds
17
+ FROM p_ci_builds
18
18
  JOIN projects
19
- ON projects.id = ci_builds.project_id
19
+ ON projects.id = p_ci_builds.project_id
20
20
  JOIN namespaces
21
21
  ON namespaces.id = projects.namespace_id
22
22
  LEFT JOIN namespace_statistics
23
23
  ON namespace_statistics.namespace_id = namespaces.id
24
24
  JOIN application_settings ON (TRUE)
25
- WHERE ci_builds.type = 'Ci::Build'
26
- AND ci_builds.status = '%s'
25
+ WHERE p_ci_builds.type = 'Ci::Build'
26
+ AND p_ci_builds.status = '%s'
27
27
  -- The created_at filter has been introduced for performance reasons only
28
- AND ci_builds.created_at > NOW() - INTERVAL '7 days'
28
+ AND p_ci_builds.created_at > NOW() - INTERVAL '7 days'
29
29
  AND projects.pending_delete = 'f'
30
30
  GROUP BY
31
31
  projects.namespace_id,
32
- ci_builds.status,
32
+ p_ci_builds.status,
33
33
  projects.shared_runners_enabled,
34
34
  namespaces.shared_runners_minutes_limit,
35
35
  namespace_statistics.shared_runners_seconds,
@@ -40,20 +40,20 @@ module GitLab
40
40
  <<~SQL.freeze
41
41
  SELECT
42
42
  projects.namespace_id,
43
- ci_builds.status,
43
+ p_ci_builds.status,
44
44
  projects.shared_runners_enabled,
45
45
  COUNT(*) AS count
46
- FROM ci_builds
46
+ FROM p_ci_builds
47
47
  JOIN projects
48
- ON projects.id = ci_builds.project_id
49
- WHERE ci_builds.type = 'Ci::Build'
50
- AND ci_builds.status = '%s'
48
+ ON projects.id = p_ci_builds.project_id
49
+ WHERE p_ci_builds.type = 'Ci::Build'
50
+ AND p_ci_builds.status = '%s'
51
51
  -- The created_at filter has been introduced for performance reasons only
52
- AND ci_builds.created_at > NOW() - INTERVAL '7 days'
52
+ AND p_ci_builds.created_at > NOW() - INTERVAL '7 days'
53
53
  AND projects.pending_delete = 'f'
54
54
  GROUP BY
55
55
  projects.namespace_id,
56
- ci_builds.status,
56
+ p_ci_builds.status,
57
57
  projects.shared_runners_enabled
58
58
  SQL
59
59
 
@@ -61,53 +61,53 @@ module GitLab
61
61
  <<~SQL.freeze
62
62
  SELECT
63
63
  COUNT(*) AS count
64
- FROM ci_builds
64
+ FROM p_ci_builds
65
65
  JOIN projects
66
- ON projects.id = ci_builds.project_id
67
- WHERE ci_builds.type = 'Ci::Build'
68
- AND ci_builds.status = 'running'
69
- AND ci_builds.updated_at < NOW() - INTERVAL '1 hour'
66
+ ON projects.id = p_ci_builds.project_id
67
+ WHERE p_ci_builds.type = 'Ci::Build'
68
+ AND p_ci_builds.status = 'running'
69
+ AND p_ci_builds.updated_at < NOW() - INTERVAL '1 hour'
70
70
  AND projects.pending_delete = 'f'
71
71
  SQL
72
72
 
73
73
  PER_RUNNER_QUERY_EE =
74
74
  <<~SQL.freeze
75
75
  SELECT
76
- ci_builds.runner_id,
76
+ p_ci_builds.runner_id,
77
77
  ci_runners.runner_type,
78
78
  projects.namespace_id,
79
79
  projects.mirror,
80
80
  projects.mirror_trigger_builds,
81
81
  ci_pipelines.pipeline_schedule_id,
82
- ci_builds.trigger_request_id,
82
+ p_ci_builds.trigger_request_id,
83
83
  (COALESCE(namespaces.shared_runners_minutes_limit, application_settings.shared_runners_minutes, 0) = 0 OR
84
84
  COALESCE(namespace_statistics.shared_runners_seconds, 0) < COALESCE(namespaces.shared_runners_minutes_limit, application_settings.shared_runners_minutes, 0) * 60) as has_minutes,
85
85
  COUNT(*) AS count
86
- FROM ci_builds
86
+ FROM p_ci_builds
87
87
  JOIN ci_runners
88
- ON ci_runners.id = ci_builds.runner_id
88
+ ON ci_runners.id = p_ci_builds.runner_id
89
89
  JOIN projects
90
- ON projects.id = ci_builds.project_id
90
+ ON projects.id = p_ci_builds.project_id
91
91
  JOIN ci_pipelines
92
- ON ci_pipelines.id = ci_builds.commit_id
92
+ ON ci_pipelines.id = p_ci_builds.commit_id
93
93
  JOIN namespaces
94
94
  ON namespaces.id = projects.namespace_id
95
95
  LEFT JOIN namespace_statistics
96
96
  ON namespace_statistics.namespace_id = namespaces.id
97
97
  JOIN application_settings ON (TRUE)
98
- WHERE ci_builds.type = 'Ci::Build'
99
- AND ci_builds.status = 'running'
98
+ WHERE p_ci_builds.type = 'Ci::Build'
99
+ AND p_ci_builds.status = 'running'
100
100
  -- The created_at filter has been introduced for performance reasons only
101
- AND ci_builds.created_at > NOW() - INTERVAL '7 days'
101
+ AND p_ci_builds.created_at > NOW() - INTERVAL '7 days'
102
102
  AND projects.pending_delete = 'f'
103
103
  GROUP BY
104
- ci_builds.runner_id,
104
+ p_ci_builds.runner_id,
105
105
  ci_runners.runner_type,
106
106
  projects.namespace_id,
107
107
  projects.mirror,
108
108
  projects.mirror_trigger_builds,
109
109
  ci_pipelines.pipeline_schedule_id,
110
- ci_builds.trigger_request_id,
110
+ p_ci_builds.trigger_request_id,
111
111
  namespaces.shared_runners_minutes_limit,
112
112
  namespace_statistics.shared_runners_seconds,
113
113
  application_settings.shared_runners_minutes
@@ -116,30 +116,30 @@ module GitLab
116
116
  PER_RUNNER_QUERY_CE =
117
117
  <<~SQL.freeze
118
118
  SELECT
119
- ci_builds.runner_id,
119
+ p_ci_builds.runner_id,
120
120
  ci_runners.runner_type,
121
121
  projects.namespace_id,
122
122
  ci_pipelines.pipeline_schedule_id,
123
- ci_builds.trigger_request_id,
123
+ p_ci_builds.trigger_request_id,
124
124
  COUNT(*) AS count
125
- FROM ci_builds
125
+ FROM p_ci_builds
126
126
  JOIN ci_runners
127
- ON ci_runners.id = ci_builds.runner_id
127
+ ON ci_runners.id = p_ci_builds.runner_id
128
128
  JOIN projects
129
- ON projects.id = ci_builds.project_id
129
+ ON projects.id = p_ci_builds.project_id
130
130
  JOIN ci_pipelines
131
- ON ci_pipelines.id = ci_builds.commit_id
132
- WHERE ci_builds.type = 'Ci::Build'
133
- AND ci_builds.status = 'running'
131
+ ON ci_pipelines.id = p_ci_builds.commit_id
132
+ WHERE p_ci_builds.type = 'Ci::Build'
133
+ AND p_ci_builds.status = 'running'
134
134
  -- The created_at filter has been introduced for performance reasons only
135
- AND ci_builds.created_at > NOW() - INTERVAL '7 days'
135
+ AND p_ci_builds.created_at > NOW() - INTERVAL '7 days'
136
136
  AND projects.pending_delete = 'f'
137
137
  GROUP BY
138
- ci_builds.runner_id,
138
+ p_ci_builds.runner_id,
139
139
  ci_runners.runner_type,
140
140
  projects.namespace_id,
141
141
  ci_pipelines.pipeline_schedule_id,
142
- ci_builds.trigger_request_id
142
+ p_ci_builds.trigger_request_id
143
143
  SQL
144
144
 
145
145
  EE_CHECK_QUERY =
@@ -151,15 +151,15 @@ module GitLab
151
151
  <<~SQL.freeze
152
152
  SELECT
153
153
  COUNT(*) as count
154
- FROM ci_builds
154
+ FROM p_ci_builds
155
155
  JOIN ci_build_trace_chunks
156
- ON ci_build_trace_chunks.build_id = ci_builds.id
156
+ ON ci_build_trace_chunks.build_id = p_ci_builds.id
157
157
  LEFT JOIN ci_job_artifacts
158
- ON ci_job_artifacts.job_id = ci_builds.id
158
+ ON ci_job_artifacts.job_id = p_ci_builds.id
159
159
  AND ci_job_artifacts.file_type = 3
160
- WHERE ci_builds.type = 'Ci::Build'
161
- AND ci_builds.status IN ('success', 'failed', 'canceled')
162
- AND ci_builds.finished_at < '%s'
160
+ WHERE p_ci_builds.type = 'Ci::Build'
161
+ AND p_ci_builds.status IN ('success', 'failed', 'canceled')
162
+ AND p_ci_builds.finished_at < '%s'
163
163
  AND ci_job_artifacts.job_id IS NULL
164
164
  SQL
165
165
 
@@ -1,5 +1,5 @@
1
1
  module GitLab
2
2
  module Exporter
3
- VERSION = "13.4.1".freeze
3
+ VERSION = "13.5.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: 13.4.1
4
+ version: 13.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Carranza