gitlab-exporter 13.3.0 → 13.3.1

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: 8a115af5d2f6c523fe9a6fb55e09e47bbae42b6fdee96d20e2f0987e758546be
4
- data.tar.gz: cbb66dac910580239114923f0b70ad40a6580cac4a1b29e69e308559c6619e3e
3
+ metadata.gz: 5ffa16533118568301cba662228785262ac08d3fb58d85572b6a02199316732d
4
+ data.tar.gz: 26fe29073fb946867318bef4dd785653d6385ebd51fa8f8ae431bebab3daf3a8
5
5
  SHA512:
6
- metadata.gz: bfe2f5921dbd280826ba2e959d1bdc09fdf721f691e32c31f12e8948805a4103b30e29cc3286b56be1c4fd9d7e766b5b5e4b7df8ae117d1a53a6b03e4bfdda7d
7
- data.tar.gz: d0dde2e781ad6599e7944c400d2efd92272b43c813229a26754cf944da6972563154c35d9f5f1f75678ecb4537edef61cb6cc13f0a8cb433a7a5922b4c755993
6
+ metadata.gz: d422202e989b82e4222a6bcc6610a2d62421da260e4a8e014b40458778ea0a64f135afb02269bb6f3513cea4cbeb3c127d3b917c6152c9c46f4403b241896f0f
7
+ data.tar.gz: e2a470642b3f97b3d9e19007bfeb365af4abe4fe7a71079a5fdcccae31939fa7b786c24a0f580c5f9a27c52edbb6c052bcea6055df89403d2e5c673caef3ee7c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-exporter (13.3.0)
4
+ gitlab-exporter (13.3.1)
5
5
  connection_pool (= 2.2.5)
6
6
  faraday (~> 1.8.0)
7
7
  pg (= 1.5.3)
@@ -23,6 +23,9 @@ module GitLab
23
23
  # needed to be re-initialized
24
24
  POOL_TIMEOUT = 90
25
25
 
26
+ # Lock for Sidekiq.redis which we need to modify, but is not concurrency safe.
27
+ SIDEKIQ_REDIS_LOCK = Mutex.new
28
+
26
29
  PrometheusMetrics.describe("sidekiq_enqueued_jobs",
27
30
  "Total number of jobs enqueued by class name. Only inspects the first #{PROBE_JOBS_LIMIT} jobs per queue.") # rubocop:disable Layout/LineLength
28
31
 
@@ -211,16 +214,15 @@ module GitLab
211
214
  end
212
215
 
213
216
  def with_sidekiq(namespaced = true)
214
- # TODO: this is not concurrent safe as we change global context
215
- # It means that we are unable to use many different sidekiq's
216
- # which is not a problem as of now
217
- Sidekiq.configure_client do |config|
218
- config.redis = self.class.connection_pool[redis_options(namespaced)]
219
- end
217
+ SIDEKIQ_REDIS_LOCK.synchronize {
218
+ Sidekiq.configure_client do |config|
219
+ config.redis = self.class.connection_pool[redis_options(namespaced)]
220
+ end
220
221
 
221
- return unless connected?
222
+ return unless connected?
222
223
 
223
- yield
224
+ yield
225
+ }
224
226
  end
225
227
 
226
228
  def redis_options(namespaced = true)
@@ -1,5 +1,5 @@
1
1
  module GitLab
2
2
  module Exporter
3
- VERSION = "13.3.0".freeze
3
+ VERSION = "13.3.1".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.3.0
4
+ version: 13.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Carranza