racecar 2.11.0 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bdff11cf4a069df69e0a54651daa9c01ba29f1dc6182ec4743da1516ba32d54
4
- data.tar.gz: 76f26192c1fdd82c95f3f0f23b4c64f18c10be1febceb585b3689136544ecb2b
3
+ metadata.gz: a4e6b0c4d52637bd8c6bb2c5e3d69013889053973195a5d73ac5d5645047f985
4
+ data.tar.gz: 23425d552932665cafa03cf245d3d4ef879e053e9e9c60d1eb172455f405f3f3
5
5
  SHA512:
6
- metadata.gz: 10656d95fba4b15e16ef742e6483f3e26de66dc192a50de2f5023134505695f10884bd8cbf5679cf5cc5cc18f76038ec5699fe68813c22ea7e73b8b3387989bf
7
- data.tar.gz: 0ea9a87038a2dd66275910cb9e651d648f8cddf5a311d29aed1af0c4ab3a395ae7812baaa9d673fc3954e18f684f03dbf40e4b202f5c58c0997202426bda777e
6
+ metadata.gz: 62d52be41cb3821a5d6534fea43deea8d02dd8a8f03d3449249be0fcdcbf5c842cbb2be8aac7065b97fb515b16370ab93f114ab44dd85dce6a22091d9ac04de4
7
+ data.tar.gz: 006efc7649ddb4257a80e1f2400a62e9e9cba0fa5573d3947f47293d4d77b9b701d66ebf6d465cf91fbf209771e5699ddc9cd7df238ecddf7f54ffbab4eb0c15
@@ -11,12 +11,13 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
 
13
13
  strategy:
14
+ fail-fast: false
14
15
  matrix:
15
16
  ruby-version:
16
- - "3.0"
17
17
  - "3.1"
18
18
  - "3.2"
19
19
  - "3.3"
20
+ - "3.4"
20
21
 
21
22
  steps:
22
23
  - uses: actions/checkout@v4
@@ -30,15 +31,23 @@ jobs:
30
31
 
31
32
  integration-specs:
32
33
  runs-on: ubuntu-latest
34
+ strategy:
35
+ fail-fast: false
36
+ matrix:
37
+ ruby-version:
38
+ - "3.1"
39
+ - "3.2"
40
+ - "3.3"
41
+ - "3.4"
33
42
  steps:
34
43
  - uses: actions/checkout@v4
35
44
  - name: Set up Ruby
36
45
  uses: ruby/setup-ruby@v1
37
46
  with:
38
- ruby-version: "3.0"
47
+ ruby-version: ${{ matrix.ruby-version }}
39
48
  bundler-cache: true
40
49
  - name: Bring up docker-compose stack
41
- run: docker-compose up -d
50
+ run: docker compose up -d
42
51
  - name: Build and test with RSpec
43
52
  env:
44
53
  RACECAR_BROKERS: localhost:9092
data/.rspec CHANGED
@@ -1,3 +1,4 @@
1
1
  --format documentation
2
2
  --require spec_helper
3
3
  --color
4
+ --order random
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.12.0
6
+
7
+ * Add tests against Ruby 3.4
8
+ * Drop support for Ruby 3.0
9
+ * Allow rdkafka gem versions newer than 0.15.0
10
+
5
11
  ## 2.11.0
6
12
 
7
13
  * Allow the liveness probe command to skip loading config files
data/Gemfile CHANGED
@@ -5,6 +5,4 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in racecar.gemspec
6
6
  gemspec
7
7
 
8
- # We actually support version 7.x (see gemspec); this extra restriction is added just for running the test suite also
9
- # on Ruby 2.6, which activesupport 7.0 does not support.
10
- gem 'activesupport', '~> 6.1.0'
8
+ gem 'activesupport', '~> 7.2.0'
data/Gemfile.lock CHANGED
@@ -1,31 +1,43 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- racecar (2.11.0)
4
+ racecar (2.12.0)
5
5
  king_konf (~> 1.0.0)
6
- rdkafka (~> 0.15.0)
6
+ rdkafka (>= 0.15.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (6.1.7.3)
12
- concurrent-ruby (~> 1.0, >= 1.0.2)
11
+ activesupport (7.2.2.1)
12
+ base64
13
+ benchmark (>= 0.3)
14
+ bigdecimal
15
+ concurrent-ruby (~> 1.0, >= 1.3.1)
16
+ connection_pool (>= 2.2.5)
17
+ drb
13
18
  i18n (>= 1.6, < 2)
19
+ logger (>= 1.4.2)
14
20
  minitest (>= 5.1)
15
- tzinfo (~> 2.0)
16
- zeitwerk (~> 2.3)
21
+ securerandom (>= 0.3)
22
+ tzinfo (~> 2.0, >= 2.0.5)
23
+ base64 (0.2.0)
24
+ benchmark (0.4.0)
25
+ bigdecimal (3.1.9)
17
26
  byebug (11.1.3)
18
27
  coderay (1.1.3)
19
- concurrent-ruby (1.2.2)
28
+ concurrent-ruby (1.3.4)
29
+ connection_pool (2.4.1)
20
30
  diff-lcs (1.5.0)
21
31
  dogstatsd-ruby (5.5.0)
32
+ drb (2.2.1)
22
33
  ffi (1.16.3)
23
34
  i18n (1.12.0)
24
35
  concurrent-ruby (~> 1.0)
25
36
  king_konf (1.0.1)
37
+ logger (1.6.4)
26
38
  method_source (1.0.0)
27
39
  mini_portile2 (2.8.5)
28
- minitest (5.18.0)
40
+ minitest (5.25.4)
29
41
  pry (0.14.2)
30
42
  coderay (~> 1.1)
31
43
  method_source (~> 1.0)
@@ -33,7 +45,7 @@ GEM
33
45
  byebug (~> 11.0)
34
46
  pry (>= 0.13, < 0.15)
35
47
  rake (13.0.6)
36
- rdkafka (0.15.1)
48
+ rdkafka (0.18.0)
37
49
  ffi (~> 1.15)
38
50
  mini_portile2 (~> 2.6)
39
51
  rake (> 12)
@@ -50,16 +62,16 @@ GEM
50
62
  diff-lcs (>= 1.2.0, < 2.0)
51
63
  rspec-support (~> 3.12.0)
52
64
  rspec-support (3.12.0)
65
+ securerandom (0.4.1)
53
66
  timecop (0.9.6)
54
67
  tzinfo (2.0.6)
55
68
  concurrent-ruby (~> 1.0)
56
- zeitwerk (2.6.7)
57
69
 
58
70
  PLATFORMS
59
71
  ruby
60
72
 
61
73
  DEPENDENCIES
62
- activesupport (~> 6.1.0)
74
+ activesupport (~> 7.2.0)
63
75
  bundler (>= 1.13, < 3)
64
76
  dogstatsd-ruby (>= 4.0.0, < 6.0.0)
65
77
  pry-byebug
@@ -69,4 +81,4 @@ DEPENDENCIES
69
81
  timecop
70
82
 
71
83
  BUNDLED WITH
72
- 2.4.9
84
+ 2.6.2
data/README.md CHANGED
@@ -716,16 +716,16 @@ apt-get update && apt-get install -y libzstd-dev
716
716
 
717
717
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
718
718
 
719
- The integration tests run against a Kafka instance that is not automatically started from within `rspec`. You can set one up using the provided `docker-compose.yml` by running `docker-compose up`.
719
+ The integration tests run against a Kafka instance that is not automatically started from within `rspec`. You can set one up using the provided `docker-compose.yml` by running `docker compose up`.
720
720
 
721
721
  ### Running RSpec within Docker
722
722
 
723
723
  There can be behavioural inconsistencies between running the specs on your machine, and in the CI pipeline. Due to this, there is now a Dockerfile included in the project, which is based on the CircleCI ruby 2.7.8 image. This could easily be extended with more Dockerfiles to cover different Ruby versions if desired. In order to run the specs via Docker:
724
724
 
725
725
  - Uncomment the `tests` service from the docker-compose.yml
726
- - Bring up the stack with `docker-compose up -d`
727
- - Execute the entire suite with `docker-compose run --rm tests bundle exec rspec`
728
- - Execute a single spec or directory with `docker-compose run --rm tests bundle exec rspec spec/integration/consumer_spec.rb`
726
+ - Bring up the stack with `docker compose up -d`
727
+ - Execute the entire suite with `docker compose run --rm tests bundle exec rspec`
728
+ - Execute a single spec or directory with `docker compose run --rm tests bundle exec rspec spec/integration/consumer_spec.rb`
729
729
 
730
730
  Please note - your code directory is mounted as a volume, so you can make code changes without needing to rebuild
731
731
 
data/docker-compose.yml CHANGED
@@ -1,8 +1,6 @@
1
- version: '2.1'
2
-
3
1
  services:
4
2
  zookeeper:
5
- image: confluentinc/cp-zookeeper:5.5.1
3
+ image: confluentinc/cp-zookeeper:7.8.1
6
4
  ports:
7
5
  - "2181:2181"
8
6
  environment:
@@ -13,7 +11,7 @@ services:
13
11
  test: echo ruok | nc 127.0.0.1 2181 | grep imok
14
12
 
15
13
  broker:
16
- image: confluentinc/cp-kafka:5.5.1
14
+ image: confluentinc/cp-kafka:7.8.1
17
15
  depends_on:
18
16
  - zookeeper
19
17
  ports:
@@ -57,7 +55,7 @@ services:
57
55
  # RACECAR_BROKERS: broker:29092
58
56
  # DOCKER_SUDO: 'true'
59
57
  # # When bringing up the stack, we just let the container exit. For running the
60
- # # specs, we'll use commands like `docker-compose run tests rspec`
58
+ # # specs, we'll use commands like `docker compose run tests rspec`
61
59
  # command: ["echo", "ready"]
62
60
  # volumes:
63
61
  # # The line below allows us to run docker commands from the container itself
@@ -68,16 +68,16 @@ module Racecar
68
68
  @instrumenter.instrument('deliver_messages', instrumentation_payload) do
69
69
  @delivery_handles.each do |handle|
70
70
  begin
71
- # rdkafka-ruby checks every wait_timeout seconds if the message was
72
- # successfully delivered, up to max_wait_timeout seconds before raising
73
- # Rdkafka::AbstractHandle::WaitTimeoutError. librdkafka will (re)try to
74
- # deliver all messages in the background, until "config.message_timeout"
71
+ # rdkafka-ruby checks with exponential backoff starting at 0 seconds wait
72
+ # if the message was successfully delivered, up to max_wait_timeout seconds
73
+ # before raising Rdkafka::AbstractHandle::WaitTimeoutError. librdkafka will
74
+ # (re)try to deliver all messages in the background, until "config.message_timeout"
75
75
  # (message.timeout.ms) is exceeded. Phrased differently, rdkafka-ruby's
76
76
  # WaitTimeoutError is just informative.
77
77
  # The raising can be avoided if max_wait_timeout below is greater than
78
78
  # config.message_timeout, but config is not available here (without
79
79
  # changing the interface).
80
- handle.wait(max_wait_timeout: 60, wait_timeout: 0.1)
80
+ handle.wait(max_wait_timeout: 60)
81
81
  rescue Rdkafka::AbstractHandle::WaitTimeoutError => e
82
82
  partition = MessageDeliveryError.partition_from_delivery_handle(handle)
83
83
  # ideally we could use the logger passed to the Runner, but it is not
@@ -40,6 +40,7 @@ module Racecar
40
40
  "client.id" => config.client_id,
41
41
  "statistics.interval.ms" => config.statistics_interval_ms,
42
42
  "message.timeout.ms" => config.message_timeout * 1000,
43
+ "partitioner" => config.partitioner.to_s
43
44
  }
44
45
  producer_config["compression.codec"] = config.producer_compression_codec.to_s unless config.producer_compression_codec.nil?
45
46
  producer_config.merge!(config.rdkafka_producer)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Racecar
4
- VERSION = "2.11.0"
4
+ VERSION = "2.12.0"
5
5
  end
data/racecar.gemspec CHANGED
@@ -20,10 +20,10 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.required_ruby_version = '>= 3.0'
23
+ spec.required_ruby_version = '>= 3.1'
24
24
 
25
25
  spec.add_runtime_dependency "king_konf", "~> 1.0.0"
26
- spec.add_runtime_dependency "rdkafka", "~> 0.15.0"
26
+ spec.add_runtime_dependency "rdkafka", ">= 0.15.0"
27
27
 
28
28
  spec.add_development_dependency "bundler", [">= 1.13", "< 3"]
29
29
  spec.add_development_dependency "pry-byebug"
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: racecar
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0
4
+ version: 2.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Schierbeck
8
8
  - Benjamin Quorning
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-06-26 00:00:00.000000000 Z
12
+ date: 2025-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: king_konf
@@ -29,14 +29,14 @@ dependencies:
29
29
  name: rdkafka
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: 0.15.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: 0.15.0
42
42
  - !ruby/object:Gem::Dependency
@@ -149,7 +149,7 @@ dependencies:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
- description:
152
+ description:
153
153
  email:
154
154
  - dschierbeck@zendesk.com
155
155
  - bquorning@zendesk.com
@@ -214,7 +214,7 @@ homepage: https://github.com/zendesk/racecar
214
214
  licenses:
215
215
  - Apache License Version 2.0
216
216
  metadata: {}
217
- post_install_message:
217
+ post_install_message:
218
218
  rdoc_options: []
219
219
  require_paths:
220
220
  - lib
@@ -222,15 +222,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
222
222
  requirements:
223
223
  - - ">="
224
224
  - !ruby/object:Gem::Version
225
- version: '3.0'
225
+ version: '3.1'
226
226
  required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  requirements:
228
228
  - - ">="
229
229
  - !ruby/object:Gem::Version
230
230
  version: '0'
231
231
  requirements: []
232
- rubygems_version: 3.5.11
233
- signing_key:
232
+ rubygems_version: 3.5.22
233
+ signing_key:
234
234
  specification_version: 4
235
235
  summary: A framework for running Kafka consumers
236
236
  test_files: []