gitlab-exporter 13.4.0 → 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: ef90bbddd738fecc23deb3342a8c24461289d1286c46c1d5d1879da07f32991d
4
- data.tar.gz: 94e6b7eea624ee7a07aa435f3985e03006a8d8ab042d7958f2d1150b71a64d3a
3
+ metadata.gz: 71244a8992a3116e4513746514842e6d6f0c53abbef7e0a7435a3889acce66c1
4
+ data.tar.gz: fc013ec18e7f7a11e3d5da3a1375fe80add92f96da1f572eb8b577ee98bedebb
5
5
  SHA512:
6
- metadata.gz: 67c47e28e6685067027922a2e12ec106b6eb4f14e1475dccb8a6430ae53e7a4e0bb111f0d2e83c4559ac38b49cb69aac6ead4308ee1534763cb9434761573085
7
- data.tar.gz: 2066407a7735b144e4c84179b8b585d8ea4dddee4d74592a2538bd3ccd1d8c69610efa3d9a7fa9cb4a6d2aa26cc61578cb564015305f56f60627ea48f56a7f7c
6
+ metadata.gz: b4d3c84092ca842c13123bb6573118adc44b60f090594db51b559bc20d2718c1e8a341494fd6ba376e6a30ce07985b2ae88923e7a68760a631936f3e962ed62f
7
+ data.tar.gz: eb579c03705bdbd4d64b5c0a5b6dc40cbfa0125939b03d250d6efe44f395fe55effabbf3733ab57a0297494530ce8efc5b3521eda12c930b7ec8ffeadc8fb7b0
@@ -0,0 +1,13 @@
1
+ <!-- Replace `<PREVIOUS_VERSION>` with the previous version number here, `<COMMIT_UPDATING_VERSION>` with the latest
2
+ commit from this merge request, and `<NEW_VERSION>` with the upcoming version number. -->
3
+ ## Diff
4
+
5
+ https://gitlab.com/gitlab-org/ruby/gems/gitlab-exporter/-/compare/v<PREVIOUS_VERSION>...<COMMIT_UPDATING_VERSION>
6
+
7
+ ## Checklist
8
+
9
+ - [ ] Diff link is up-to-date.
10
+ - [ ] Check the release notes: https://gitlab.com/api/v4/projects/gitlab-org%2Fruby%2Fgems%2Fgitlab-exporter/repository/changelog?version=<NEW_VERSION>
11
+ - [ ] Based on the diff and the release notes, `version.rb` is updated, according to [SemVer](https://semver.org).
12
+
13
+ /label ~"type::maintenance" ~"static code analysis"
data/.gitlab-ci.yml CHANGED
@@ -5,6 +5,9 @@ include:
5
5
  - template: Security/License-Scanning.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/License-Scanning.gitlab-ci.yml
6
6
  - template: Security/SAST.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
7
7
  - template: Security/Secret-Detection.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/lib/gitlab/ci/templates/Security/Secret-Detection.gitlab-ci.yml
8
+ - project: 'gitlab-org/quality/pipeline-common'
9
+ file:
10
+ - '/ci/gem-release.yml'
8
11
 
9
12
  variables:
10
13
  RUBY_VERSION: "2.7"
@@ -12,7 +15,7 @@ variables:
12
15
  stages:
13
16
  - test
14
17
  - dast
15
- - publish
18
+ - deploy
16
19
 
17
20
  default:
18
21
  image: ruby:${RUBY_VERSION}
@@ -70,16 +73,3 @@ gemnasium-dependency_scanning:
70
73
 
71
74
  secret_detection:
72
75
  rules: *workflow_rules
73
-
74
- publish_to_rubygems:
75
- stage: publish
76
- script:
77
- - mkdir -p ~/.gem
78
- - 'echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials'
79
- - chmod 0600 ~/.gem/credentials
80
- - gem build gitlab-exporter.gemspec --output=gitlab-exporter.gem
81
- - gem push gitlab-exporter.gem
82
- before_script: *before_scripts
83
- rules:
84
- # Only push to RubyGems.org when we tag a new version
85
- - if: '$CI_COMMIT_TAG'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-exporter (13.4.0)
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)
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.test_files = s.files.grep(%r{^(spec)/})
18
18
 
19
19
  s.require_paths = ["lib"]
20
- s.homepage = "http://gitlab.com"
20
+ s.homepage = "https://gitlab.com/gitlab-org/ruby/gems/gitlab-exporter"
21
21
  s.license = "MIT"
22
22
 
23
23
  s.add_runtime_dependency "connection_pool", "2.2.5"
@@ -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.0".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.0
4
+ version: 13.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Carranza
@@ -187,6 +187,7 @@ extra_rdoc_files: []
187
187
  files:
188
188
  - ".gitignore"
189
189
  - ".gitlab-ci.yml"
190
+ - ".gitlab/merge_request_templates/Release.md"
190
191
  - ".rubocop.yml"
191
192
  - ".rubocop_todo.yml"
192
193
  - ".ruby-version"
@@ -238,7 +239,7 @@ files:
238
239
  - spec/sidekiq_spec.rb
239
240
  - spec/spec_helper.rb
240
241
  - spec/util_spec.rb
241
- homepage: http://gitlab.com
242
+ homepage: https://gitlab.com/gitlab-org/ruby/gems/gitlab-exporter
242
243
  licenses:
243
244
  - MIT
244
245
  metadata: {}