gitlab-labkit 0.34.0 → 0.35.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +1 -2
- data/.ruby-version +1 -1
- data/.tool-versions +1 -1
- data/gitlab-labkit.gemspec +2 -2
- data/lib/labkit/context.rb +0 -4
- data/lib/labkit/middleware/sidekiq/context/client.rb +9 -1
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48e2df6dd68eddc3928dad7c12f616bc124c16c55fd3d94947a21f23dc9cd732
|
4
|
+
data.tar.gz: 4b7dd6dffbb2936d6464b5777ac01db0c2142cdfa79b0527419a3750fcbe6b60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7eea840bb4724fedc0f0789d87f234a4f997dce9cdefece2ea839c09c4c0a6a2494f80048d8fbb9dcd0545e1ec4fca0e1600fb528bbeffd6369458868ebb94c
|
7
|
+
data.tar.gz: d2274b20b41924ed939e2f09d9ae0dcefbdcfff8bed448d8c045373c1afa72785f2a9e528036e535460807cd59532f4d5eb96b45949abea24eb33b9de6ca15ca
|
data/.gitlab-ci.yml
CHANGED
@@ -26,7 +26,7 @@ ruby:
|
|
26
26
|
<<: *test_definition
|
27
27
|
parallel:
|
28
28
|
matrix:
|
29
|
-
- RUBY_VERSION: ["
|
29
|
+
- RUBY_VERSION: ["3.0", "3.1", "3.2"]
|
30
30
|
|
31
31
|
static-analysis:
|
32
32
|
before_script:
|
@@ -35,7 +35,6 @@ static-analysis:
|
|
35
35
|
- rake verify
|
36
36
|
|
37
37
|
danger-review:
|
38
|
-
image: ruby:3.0
|
39
38
|
stage: test
|
40
39
|
except:
|
41
40
|
- tags
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.4
|
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby 2.
|
1
|
+
ruby 3.1.4 3.2.2
|
data/gitlab-labkit.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = "Instrumentation for GitLab"
|
13
13
|
spec.homepage = "https://gitlab.com/gitlab-org/labkit-ruby"
|
14
|
-
spec.metadata = { "source_code_uri" => "https://gitlab.com/gitlab-org/labkit-ruby" }
|
14
|
+
spec.metadata = { "source_code_uri" => "https://gitlab.com/gitlab-org/ruby/gems/labkit-ruby" }
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec|tools)/}) }
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_runtime_dependency "grpc", ">= 1.37" # Be sure to update the "grpc-tools" dev_dependency too
|
25
25
|
spec.add_runtime_dependency "jaeger-client", "~> 1.1.0"
|
26
26
|
spec.add_runtime_dependency "opentracing", "~> 0.4"
|
27
|
-
spec.add_runtime_dependency "pg_query", "
|
27
|
+
spec.add_runtime_dependency "pg_query", ">= 4.2.3", "< 6.0"
|
28
28
|
spec.add_runtime_dependency "redis", ">3.0.0", "<6.0.0"
|
29
29
|
|
30
30
|
# Please maintain alphabetical order for dev dependencies
|
data/lib/labkit/context.rb
CHANGED
@@ -9,7 +9,15 @@ module Labkit
|
|
9
9
|
# be reinstantiated by Sidekiq-server when running the job.
|
10
10
|
class Client
|
11
11
|
def call(_worker_class, job, _queue, _redis_pool)
|
12
|
-
|
12
|
+
attributes = {}
|
13
|
+
|
14
|
+
# Don't overwrite the correlation_id from the job. A new context
|
15
|
+
# will always generate a new correlation_id and we'd rather carry
|
16
|
+
# through the correlation_id from the previous job if it is
|
17
|
+
# present (eg. for retries).
|
18
|
+
attributes[Labkit::Context::CORRELATION_ID_KEY] = job["correlation_id"] if job["correlation_id"]
|
19
|
+
|
20
|
+
Labkit::Context.with_context(attributes) do |context|
|
13
21
|
job.merge!(context.to_h)
|
14
22
|
|
15
23
|
yield
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-labkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.35.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Newdigate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -96,16 +96,22 @@ dependencies:
|
|
96
96
|
name: pg_query
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- - "
|
99
|
+
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: 4.2.3
|
102
|
+
- - "<"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '6.0'
|
102
105
|
type: :runtime
|
103
106
|
prerelease: false
|
104
107
|
version_requirements: !ruby/object:Gem::Requirement
|
105
108
|
requirements:
|
106
|
-
- - "
|
109
|
+
- - ">="
|
107
110
|
- !ruby/object:Gem::Version
|
108
111
|
version: 4.2.3
|
112
|
+
- - "<"
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '6.0'
|
109
115
|
- !ruby/object:Gem::Dependency
|
110
116
|
name: redis
|
111
117
|
requirement: !ruby/object:Gem::Requirement
|
@@ -446,7 +452,7 @@ homepage: https://gitlab.com/gitlab-org/labkit-ruby
|
|
446
452
|
licenses:
|
447
453
|
- MIT
|
448
454
|
metadata:
|
449
|
-
source_code_uri: https://gitlab.com/gitlab-org/labkit-ruby
|
455
|
+
source_code_uri: https://gitlab.com/gitlab-org/ruby/gems/labkit-ruby
|
450
456
|
post_install_message:
|
451
457
|
rdoc_options: []
|
452
458
|
require_paths:
|