waterdrop 2.8.16 → 2.10.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 +4 -4
- data/.gitignore +4 -1
- data/.rubocop.yml +2 -41
- data/.ruby-version +1 -1
- data/.yard-lint.yml +1 -1
- data/CHANGELOG.md +17 -0
- data/Gemfile +2 -1
- data/Gemfile.lint +2 -2
- data/Gemfile.lint.lock +11 -26
- data/Gemfile.lock +43 -66
- data/Rakefile +12 -0
- data/bin/integrations +5 -3
- data/bin/verify_kafka_warnings +1 -0
- data/config/locales/errors.yml +6 -0
- data/docker-compose.oauth.yml +3 -3
- data/docker-compose.sasl.yml +26 -0
- data/docker-compose.yml +1 -1
- data/lib/waterdrop/clients/rdkafka.rb +153 -31
- data/lib/waterdrop/config.rb +23 -6
- data/lib/waterdrop/contracts/config.rb +3 -0
- data/lib/waterdrop/contracts/tombstone.rb +21 -0
- data/lib/waterdrop/errors.rb +7 -0
- data/lib/waterdrop/instrumentation/callbacks/statistics.rb +4 -2
- data/lib/waterdrop/instrumentation/monitor.rb +61 -0
- data/lib/waterdrop/polling/latch.rb +1 -0
- data/lib/waterdrop/polling/poller.rb +4 -0
- data/lib/waterdrop/producer/tombstone.rb +78 -0
- data/lib/waterdrop/producer/variant.rb +3 -2
- data/lib/waterdrop/producer.rb +1 -0
- data/lib/waterdrop/version.rb +1 -1
- data/package-lock.json +3 -3
- data/renovate.json +6 -3
- data/waterdrop.gemspec +2 -2
- metadata +7 -14
- data/.github/CODEOWNERS +0 -3
- data/.github/FUNDING.yml +0 -1
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -43
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- data/.github/workflows/ci.yml +0 -322
- data/.github/workflows/push.yml +0 -35
- data/.github/workflows/trigger-wiki-refresh.yml +0 -30
- data/.github/workflows/verify-action-pins.yml +0 -16
- data/.rspec +0 -2
- data/log/.gitkeep +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5a840a99425c1700eb3ea2cad5da08279e11ba0f4a2600b046dcef14bca9255b
|
|
4
|
+
data.tar.gz: 6107f58c3ed66912e56379660a021eb87c1e18a0d7fee7702460c1e90b75fea3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 454ff01bc3baa3c2b47c46c6538dd8310c3b2af10cafe3551f00630e78d5980b7afeec7eb2047f769b24d0d6106aba4366e04e99d91045154a4ddb0b34edd4b1
|
|
7
|
+
data.tar.gz: '0980ac5585f18983d4d6918f99cf8bf070160d5c99964459c714b532195d74372785dd9b3e40366fae709f92aea9c364e2b71d33c3ffadde0528f60e863d8348'
|
data/.gitignore
CHANGED
|
@@ -30,7 +30,7 @@ db/*.sqlite3
|
|
|
30
30
|
/doc/yard
|
|
31
31
|
/doc/features.html
|
|
32
32
|
/doc/specs.html
|
|
33
|
-
/
|
|
33
|
+
/test/tmp/*
|
|
34
34
|
/cache
|
|
35
35
|
/capybara*
|
|
36
36
|
/capybara-*.html
|
|
@@ -67,3 +67,6 @@ pickle-email-*.html
|
|
|
67
67
|
.yardoc
|
|
68
68
|
|
|
69
69
|
.byebug_history
|
|
70
|
+
|
|
71
|
+
# Integration test lock files (generated locally with paths, CI runs bundle install)
|
|
72
|
+
test/integrations/**/Gemfile.lock
|
data/.rubocop.yml
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
plugins:
|
|
4
|
-
- rubocop-
|
|
5
|
-
- rubocop-factory_bot
|
|
4
|
+
- rubocop-minitest
|
|
6
5
|
- rubocop-performance
|
|
7
|
-
- rubocop-rspec
|
|
8
|
-
- rubocop-rspec_rails
|
|
9
6
|
- rubocop-thread_safety
|
|
10
7
|
|
|
11
8
|
inherit_gem:
|
|
12
9
|
standard: config/base.yml
|
|
13
10
|
standard-performance: config/base.yml
|
|
14
|
-
standard-
|
|
11
|
+
standard-minitest: config/base.yml
|
|
15
12
|
|
|
16
13
|
AllCops:
|
|
17
14
|
NewCops: enable
|
|
@@ -23,16 +20,6 @@ AllCops:
|
|
|
23
20
|
- "**/Rakefile"
|
|
24
21
|
- Gemfile.lint
|
|
25
22
|
|
|
26
|
-
# Disabled departments - not a Rails project, no Capybara/FactoryBot
|
|
27
|
-
Capybara:
|
|
28
|
-
Enabled: false
|
|
29
|
-
|
|
30
|
-
FactoryBot:
|
|
31
|
-
Enabled: false
|
|
32
|
-
|
|
33
|
-
RSpecRails:
|
|
34
|
-
Enabled: false
|
|
35
|
-
|
|
36
23
|
# Layout
|
|
37
24
|
Layout/LineLength:
|
|
38
25
|
Max: 100
|
|
@@ -45,32 +32,6 @@ Lint/RescueException:
|
|
|
45
32
|
Exclude:
|
|
46
33
|
- lib/waterdrop/producer/transactions.rb
|
|
47
34
|
|
|
48
|
-
# RSpec
|
|
49
|
-
RSpec:
|
|
50
|
-
Exclude:
|
|
51
|
-
- spec/integrations/**/*
|
|
52
|
-
|
|
53
|
-
RSpec/ExampleLength:
|
|
54
|
-
Enabled: false
|
|
55
|
-
|
|
56
|
-
RSpec/IndexedLet:
|
|
57
|
-
Enabled: false
|
|
58
|
-
|
|
59
|
-
RSpec/MultipleExpectations:
|
|
60
|
-
Enabled: false
|
|
61
|
-
|
|
62
|
-
RSpec/MultipleMemoizedHelpers:
|
|
63
|
-
Max: 20
|
|
64
|
-
|
|
65
|
-
RSpec/NestedGroups:
|
|
66
|
-
Max: 4
|
|
67
|
-
|
|
68
|
-
RSpec/NoExpectationExample:
|
|
69
|
-
Enabled: false
|
|
70
|
-
|
|
71
|
-
RSpec/SpecFilePathFormat:
|
|
72
|
-
Enabled: false
|
|
73
|
-
|
|
74
35
|
# Style
|
|
75
36
|
Style/SlicingWithRange:
|
|
76
37
|
Exclude:
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
1
|
+
4.0.3
|
data/.yard-lint.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# WaterDrop changelog
|
|
2
2
|
|
|
3
|
+
## 2.10.0 (2026-05-07)
|
|
4
|
+
- [Fix] Clean up native rdkafka client, global instrumentation callbacks, and poller registration when `init_transactions` fails during producer client construction. Previously, each failed attempt permanently leaked native threads, pipe file descriptors, and callback registry entries because the started `rd_kafka_t` handle was abandoned without being destroyed.
|
|
5
|
+
- **[Breaking]** Skip emitting librdkafka statistics when nothing is subscribed to `statistics.emitted` at the time the underlying rdkafka client is constructed. When no listener is present at build time, `statistics.interval.ms` is forced to `0` regardless of user configuration and the statistics callback is not registered, saving substantial allocations in the hot path (no JSON parsing, no statistics hash materialization, no decoration work). To use statistics, subscribe a listener to `statistics.emitted` BEFORE the first producer use (before the underlying client is lazily initialized).
|
|
6
|
+
- **[Breaking]** Raise `WaterDrop::Errors::StatisticsNotEnabledError` when attempting to subscribe to `statistics.emitted` (either via block or via a listener that responds to `on_statistics_emitted`) on a monitor where librdkafka statistics have been disabled at client build time. This replaces the "silent nothing" failure mode with an immediate, actionable error that pinpoints the timing mistake.
|
|
7
|
+
- [Feature] Add tombstone API (`#tombstone_sync`, `#tombstone_async`, `#tombstone_many_sync`, `#tombstone_many_async`) for producing tombstone records (nil-payload messages) with required key and partition validation. Works with variants.
|
|
8
|
+
- [Fix] Add `ensure_same_process!` to `Poller#unregister` for fork safety. Without this, a child process that inherited a pre-fork producer would deadlock on `producer.close` because `unregister` waited on a latch the dead parent poller thread would never release.
|
|
9
|
+
|
|
10
|
+
## 2.9.0 (2026-04-08)
|
|
11
|
+
- [Fix] Use `delete` in the variant ensure block to avoid leaving stale nil entries in `Fiber.current.waterdrop_clients` and prevent memory leaks in long-running processes (#836).
|
|
12
|
+
- [Fix] Exclude test files, `.github/`, and `log/` directories from gem releases to reduce package size.
|
|
13
|
+
- **[Breaking]** Switch default polling mode from `:thread` to `:fd`. If you experience any issues, you can revert to the previous behavior by setting `config.polling.mode = :thread`. The `:thread` mode will be deprecated in 2.10 and removed in 2.11.
|
|
14
|
+
- **[Breaking]** Statistics decorator now only decorates keys used by the built-in Datadog metrics listener (`tx`, `txretries`, `txerrs`, `rxerrs`) and skips unused subtrees (`topics`, broker window stats). This reduces decoration cost by ~425x on large clusters (10 brokers, 20 topics, 2000 partitions). Users who rely on other `_d` or `_fd` keys in custom instrumentation should provide a custom decorator via `config.statistics_decorator`.
|
|
15
|
+
- [Feature] Add `config.statistics_decorator` setting to allow full control over the `StatisticsDecorator` instance used for statistics decoration. Users can provide a custom decorator with different `only_keys` and `excluded_keys` to match their instrumentation needs.
|
|
16
|
+
- [Change] Upscale default timeout values 3x closer to librdkafka defaults to prevent intermediate timeouts during node recovery (`message.timeout.ms`: 50s → 150s, `transaction.timeout.ms`: 55s → 165s, `max_wait_timeout`: 60s → 180s).
|
|
17
|
+
|
|
18
|
+
**Upgrade Notes**: https://karafka.io/docs/Upgrades-WaterDrop-2.9/
|
|
19
|
+
|
|
3
20
|
## 2.8.16 (2026-02-25)
|
|
4
21
|
- [Feature] Add FD-based polling mode (`config.polling.mode = :fd`) as an alternative to the default thread-based polling. FD mode uses a single Ruby thread with IO.select for efficient multiplexing, providing 39-54% higher throughput, lower memory usage, and fewer threads compared to the default thread mode.
|
|
5
22
|
- [Feature] Add `config.polling.fd.max_time` setting (default: 100ms) to control maximum polling time per producer per cycle. This enables per-producer priority differentiation.
|
data/Gemfile
CHANGED
data/Gemfile.lint
CHANGED
data/Gemfile.lint.lock
CHANGED
|
@@ -27,23 +27,14 @@ GEM
|
|
|
27
27
|
rubocop-ast (1.49.0)
|
|
28
28
|
parser (>= 3.3.7.2)
|
|
29
29
|
prism (~> 1.7)
|
|
30
|
-
rubocop-
|
|
30
|
+
rubocop-minitest (0.39.1)
|
|
31
31
|
lint_roller (~> 1.1)
|
|
32
|
-
rubocop (
|
|
33
|
-
|
|
34
|
-
lint_roller (~> 1.1)
|
|
35
|
-
rubocop (~> 1.72, >= 1.72.1)
|
|
32
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
33
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
36
34
|
rubocop-performance (1.26.1)
|
|
37
35
|
lint_roller (~> 1.1)
|
|
38
36
|
rubocop (>= 1.75.0, < 2.0)
|
|
39
37
|
rubocop-ast (>= 1.47.1, < 2.0)
|
|
40
|
-
rubocop-rspec (3.9.0)
|
|
41
|
-
lint_roller (~> 1.1)
|
|
42
|
-
rubocop (~> 1.81)
|
|
43
|
-
rubocop-rspec_rails (2.32.0)
|
|
44
|
-
lint_roller (~> 1.1)
|
|
45
|
-
rubocop (~> 1.72, >= 1.72.1)
|
|
46
|
-
rubocop-rspec (~> 3.5)
|
|
47
38
|
rubocop-thread_safety (0.7.3)
|
|
48
39
|
lint_roller (~> 1.1)
|
|
49
40
|
rubocop (~> 1.72, >= 1.72.1)
|
|
@@ -58,15 +49,12 @@ GEM
|
|
|
58
49
|
standard-custom (1.0.2)
|
|
59
50
|
lint_roller (~> 1.0)
|
|
60
51
|
rubocop (~> 1.50)
|
|
52
|
+
standard-minitest (1.0.0)
|
|
53
|
+
lint_roller (~> 1.0)
|
|
54
|
+
rubocop-minitest
|
|
61
55
|
standard-performance (1.9.0)
|
|
62
56
|
lint_roller (~> 1.1)
|
|
63
57
|
rubocop-performance (~> 1.26.0)
|
|
64
|
-
standard-rspec (0.3.1)
|
|
65
|
-
lint_roller (>= 1.0)
|
|
66
|
-
rubocop-capybara (~> 2.22)
|
|
67
|
-
rubocop-factory_bot (~> 2.27)
|
|
68
|
-
rubocop-rspec (~> 3.5)
|
|
69
|
-
rubocop-rspec_rails (~> 2.31)
|
|
70
58
|
unicode-display_width (3.2.0)
|
|
71
59
|
unicode-emoji (~> 4.1)
|
|
72
60
|
unicode-emoji (4.2.0)
|
|
@@ -81,12 +69,12 @@ PLATFORMS
|
|
|
81
69
|
x86_64-linux
|
|
82
70
|
|
|
83
71
|
DEPENDENCIES
|
|
72
|
+
rubocop-minitest
|
|
84
73
|
rubocop-performance
|
|
85
|
-
rubocop-rspec
|
|
86
74
|
rubocop-thread_safety
|
|
87
75
|
standard
|
|
76
|
+
standard-minitest
|
|
88
77
|
standard-performance
|
|
89
|
-
standard-rspec
|
|
90
78
|
yard-lint
|
|
91
79
|
|
|
92
80
|
CHECKSUMS
|
|
@@ -102,17 +90,14 @@ CHECKSUMS
|
|
|
102
90
|
regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4
|
|
103
91
|
rubocop (1.82.1) sha256=09f1a6a654a960eda767aebea33e47603080f8e9c9a3f019bf9b94c9cab5e273
|
|
104
92
|
rubocop-ast (1.49.0) sha256=49c3676d3123a0923d333e20c6c2dbaaae2d2287b475273fddee0c61da9f71fd
|
|
105
|
-
rubocop-
|
|
106
|
-
rubocop-factory_bot (2.28.0) sha256=4b17fc02124444173317e131759d195b0d762844a71a29fe8139c1105d92f0cb
|
|
93
|
+
rubocop-minitest (0.39.1) sha256=998398d6da4026d297f0f9bf709a1eac5f2b6947c24431f94af08138510cf7ed
|
|
107
94
|
rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
|
|
108
|
-
rubocop-rspec (3.9.0) sha256=8fa70a3619408237d789aeecfb9beef40576acc855173e60939d63332fdb55e2
|
|
109
|
-
rubocop-rspec_rails (2.32.0) sha256=4a0d641c72f6ebb957534f539d9d0a62c47abd8ce0d0aeee1ef4701e892a9100
|
|
110
95
|
rubocop-thread_safety (0.7.3) sha256=067cdd52fbf5deffc18995437e45b5194236eaff4f71de3375a1f6052e48f431
|
|
111
96
|
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
112
97
|
standard (1.53.0) sha256=f3c9493385db7079d0abce6f7582f553122156997b81258cd361d3480eeacf9c
|
|
113
98
|
standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
|
|
99
|
+
standard-minitest (1.0.0) sha256=450caa86a64a6e6f6f186cc88601dbb49b6cfaa3b0dce77a73b50ba8cdc15b2a
|
|
114
100
|
standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
|
|
115
|
-
standard-rspec (0.3.1) sha256=67bc957281cacf24f0d88235ca1bf28a8995265b1a60eb519cd0451858b56a22
|
|
116
101
|
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
|
|
117
102
|
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
|
|
118
103
|
yard (0.9.38) sha256=721fb82afb10532aa49860655f6cc2eaa7130889df291b052e1e6b268283010f
|
|
@@ -120,4 +105,4 @@ CHECKSUMS
|
|
|
120
105
|
zeitwerk (2.7.4) sha256=2bef90f356bdafe9a6c2bd32bcd804f83a4f9b8bc27f3600fff051eb3edcec8b
|
|
121
106
|
|
|
122
107
|
BUNDLED WITH
|
|
123
|
-
|
|
108
|
+
2.6.9
|
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
waterdrop (2.
|
|
5
|
-
karafka-core (>= 2.
|
|
4
|
+
waterdrop (2.10.0)
|
|
5
|
+
karafka-core (>= 2.5.12, < 3.0.0)
|
|
6
6
|
karafka-rdkafka (>= 0.24.0)
|
|
7
7
|
zeitwerk (~> 2.3)
|
|
8
8
|
|
|
@@ -12,49 +12,15 @@ GEM
|
|
|
12
12
|
byebug (13.0.0)
|
|
13
13
|
reline (>= 0.6.0)
|
|
14
14
|
connection_pool (3.0.2)
|
|
15
|
-
diff-lcs (1.6.2)
|
|
16
15
|
docile (1.4.1)
|
|
17
|
-
|
|
18
|
-
ffi (1.17.
|
|
19
|
-
ffi (1.17.3-aarch64-linux-musl)
|
|
20
|
-
ffi (1.17.3-arm-linux-gnu)
|
|
21
|
-
ffi (1.17.3-arm-linux-musl)
|
|
22
|
-
ffi (1.17.3-arm64-darwin)
|
|
23
|
-
ffi (1.17.3-x86-linux-gnu)
|
|
24
|
-
ffi (1.17.3-x86-linux-musl)
|
|
25
|
-
ffi (1.17.3-x86_64-darwin)
|
|
26
|
-
ffi (1.17.3-x86_64-linux-gnu)
|
|
27
|
-
ffi (1.17.3-x86_64-linux-musl)
|
|
16
|
+
drb (2.2.3)
|
|
17
|
+
ffi (1.17.4)
|
|
28
18
|
io-console (0.8.2)
|
|
29
|
-
json (2.
|
|
30
|
-
karafka-core (2.5.
|
|
19
|
+
json (2.19.3)
|
|
20
|
+
karafka-core (2.5.12)
|
|
31
21
|
karafka-rdkafka (>= 0.20.0)
|
|
32
22
|
logger (>= 1.6.0)
|
|
33
|
-
karafka-rdkafka (0.
|
|
34
|
-
ffi (~> 1.17.1)
|
|
35
|
-
json (> 2.0)
|
|
36
|
-
logger
|
|
37
|
-
mini_portile2 (~> 2.6)
|
|
38
|
-
rake (> 12)
|
|
39
|
-
karafka-rdkafka (0.24.0-aarch64-linux-gnu)
|
|
40
|
-
ffi (~> 1.17.1)
|
|
41
|
-
json (> 2.0)
|
|
42
|
-
logger
|
|
43
|
-
mini_portile2 (~> 2.6)
|
|
44
|
-
rake (> 12)
|
|
45
|
-
karafka-rdkafka (0.24.0-aarch64-linux-musl)
|
|
46
|
-
ffi (~> 1.17.1)
|
|
47
|
-
json (> 2.0)
|
|
48
|
-
logger
|
|
49
|
-
mini_portile2 (~> 2.6)
|
|
50
|
-
rake (> 12)
|
|
51
|
-
karafka-rdkafka (0.24.0-arm64-darwin)
|
|
52
|
-
ffi (~> 1.17.1)
|
|
53
|
-
json (> 2.0)
|
|
54
|
-
logger
|
|
55
|
-
mini_portile2 (~> 2.6)
|
|
56
|
-
rake (> 12)
|
|
57
|
-
karafka-rdkafka (0.24.0-x86_64-linux-gnu)
|
|
23
|
+
karafka-rdkafka (0.25.0)
|
|
58
24
|
ffi (~> 1.17.1)
|
|
59
25
|
json (> 2.0)
|
|
60
26
|
logger
|
|
@@ -62,23 +28,17 @@ GEM
|
|
|
62
28
|
rake (> 12)
|
|
63
29
|
logger (1.7.0)
|
|
64
30
|
mini_portile2 (2.8.9)
|
|
31
|
+
minitest (6.0.6)
|
|
32
|
+
drb (~> 2.0)
|
|
33
|
+
prism (~> 1.5)
|
|
34
|
+
mocha (3.1.0)
|
|
35
|
+
ruby2_keywords (>= 0.0.5)
|
|
65
36
|
ostruct (0.6.3)
|
|
37
|
+
prism (1.9.0)
|
|
66
38
|
rake (13.3.1)
|
|
67
39
|
reline (0.6.3)
|
|
68
40
|
io-console (~> 0.5)
|
|
69
|
-
|
|
70
|
-
rspec-core (~> 3.13.0)
|
|
71
|
-
rspec-expectations (~> 3.13.0)
|
|
72
|
-
rspec-mocks (~> 3.13.0)
|
|
73
|
-
rspec-core (3.13.6)
|
|
74
|
-
rspec-support (~> 3.13.0)
|
|
75
|
-
rspec-expectations (3.13.5)
|
|
76
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
77
|
-
rspec-support (~> 3.13.0)
|
|
78
|
-
rspec-mocks (3.13.6)
|
|
79
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
80
|
-
rspec-support (~> 3.13.0)
|
|
81
|
-
rspec-support (3.13.6)
|
|
41
|
+
ruby2_keywords (0.0.5)
|
|
82
42
|
simplecov (0.22.0)
|
|
83
43
|
docile (~> 1.1)
|
|
84
44
|
simplecov-html (~> 0.11)
|
|
@@ -89,27 +49,44 @@ GEM
|
|
|
89
49
|
zeitwerk (2.7.5)
|
|
90
50
|
|
|
91
51
|
PLATFORMS
|
|
92
|
-
aarch64-linux-gnu
|
|
93
|
-
aarch64-linux-musl
|
|
94
|
-
arm-linux-gnu
|
|
95
|
-
arm-linux-musl
|
|
96
|
-
arm64-darwin
|
|
97
52
|
ruby
|
|
98
|
-
x86-linux-gnu
|
|
99
|
-
x86-linux-musl
|
|
100
|
-
x86_64-darwin
|
|
101
|
-
x86_64-linux-gnu
|
|
102
|
-
x86_64-linux-musl
|
|
103
53
|
|
|
104
54
|
DEPENDENCIES
|
|
105
55
|
byebug
|
|
106
56
|
connection_pool
|
|
57
|
+
minitest
|
|
58
|
+
mocha
|
|
107
59
|
ostruct
|
|
108
|
-
rspec
|
|
109
60
|
simplecov
|
|
110
61
|
warning
|
|
111
62
|
waterdrop!
|
|
112
63
|
zeitwerk (~> 2.7.0)
|
|
113
64
|
|
|
65
|
+
CHECKSUMS
|
|
66
|
+
byebug (13.0.0) sha256=d2263efe751941ca520fa29744b71972d39cbc41839496706f5d9b22e92ae05d
|
|
67
|
+
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
68
|
+
docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
|
|
69
|
+
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
70
|
+
ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf
|
|
71
|
+
io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
|
|
72
|
+
json (2.19.3) sha256=289b0bb53052a1fa8c34ab33cc750b659ba14a5c45f3fcf4b18762dc67c78646
|
|
73
|
+
karafka-core (2.5.12) sha256=57cbb45a187fbe3df9b9a57af59dda7211f9969524b2afbb83792a64705860e1
|
|
74
|
+
karafka-rdkafka (0.25.0) sha256=67b316b942cf9ff7e9d7bbf9029e6f2d91eba97b4c9dc93b9f49fd207dfb80f8
|
|
75
|
+
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
76
|
+
mini_portile2 (2.8.9) sha256=0cd7c7f824e010c072e33f68bc02d85a00aeb6fce05bb4819c03dfd3c140c289
|
|
77
|
+
minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
|
|
78
|
+
mocha (3.1.0) sha256=75f42d69ebfb1f10b32489dff8f8431d37a418120ecdfc07afe3bc183d4e1d56
|
|
79
|
+
ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
|
|
80
|
+
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
|
|
81
|
+
rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
|
|
82
|
+
reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
|
|
83
|
+
ruby2_keywords (0.0.5) sha256=ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef
|
|
84
|
+
simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
|
|
85
|
+
simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
|
|
86
|
+
simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
|
|
87
|
+
warning (1.5.0) sha256=0f12c49fea0c06757778eefdcc7771e4fd99308901e3d55c504d87afdd718c53
|
|
88
|
+
waterdrop (2.10.0)
|
|
89
|
+
zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd
|
|
90
|
+
|
|
114
91
|
BUNDLED WITH
|
|
115
|
-
|
|
92
|
+
4.0.6
|
data/Rakefile
CHANGED
|
@@ -2,3 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
require "bundler/setup"
|
|
4
4
|
require "bundler/gem_tasks"
|
|
5
|
+
require "minitest/test_task"
|
|
6
|
+
|
|
7
|
+
Minitest::TestTask.create(:test) do |t|
|
|
8
|
+
t.libs << "test"
|
|
9
|
+
t.libs << "lib"
|
|
10
|
+
t.test_globs = ["test/**/*_test.rb"]
|
|
11
|
+
# Load test_helper before minitest/autorun so SimpleCov's at_exit hook is
|
|
12
|
+
# registered first and thus runs last (LIFO), collecting coverage AFTER tests
|
|
13
|
+
t.test_prelude = 'require "test_helper"; require "minitest/autorun"'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
task default: :test
|
data/bin/integrations
CHANGED
|
@@ -49,7 +49,7 @@ class Scenario
|
|
|
49
49
|
|
|
50
50
|
# @return [String] integration spec name
|
|
51
51
|
def name
|
|
52
|
-
@path.gsub("#{ROOT_PATH}/
|
|
52
|
+
@path.gsub("#{ROOT_PATH}/test/integrations/", "")
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
# @return [Boolean] did this scenario finished or is it still running
|
|
@@ -142,6 +142,7 @@ class Scenario
|
|
|
142
142
|
# We copy the spec into a temp dir, not to pollute the spec location with logs, etc
|
|
143
143
|
temp_dir = Dir.mktmpdir
|
|
144
144
|
file_name = File.basename(@path)
|
|
145
|
+
spec_file_path = @path.sub("#{ROOT_PATH}/", "")
|
|
145
146
|
|
|
146
147
|
FileUtils.cp_r("#{scenario_dir}/.", temp_dir)
|
|
147
148
|
|
|
@@ -151,7 +152,8 @@ class Scenario
|
|
|
151
152
|
bundle install &&
|
|
152
153
|
BUNDLE_AUTO_INSTALL=true \
|
|
153
154
|
WATERDROP_GEM_DIR=#{ROOT_PATH} \
|
|
154
|
-
|
|
155
|
+
SPEC_FILE_PATH=#{spec_file_path} \
|
|
156
|
+
bundle exec ruby -r "#{ROOT_PATH}/test/support/spec_hash" #{file_name}
|
|
155
157
|
CMD
|
|
156
158
|
end
|
|
157
159
|
|
|
@@ -162,7 +164,7 @@ class Scenario
|
|
|
162
164
|
end
|
|
163
165
|
|
|
164
166
|
# Load all the specs
|
|
165
|
-
specs = Dir[ROOT_PATH.join("
|
|
167
|
+
specs = Dir[ROOT_PATH.join("test/integrations/**/*_spec.rb")]
|
|
166
168
|
|
|
167
169
|
FILTER_TYPE = (ARGV[0] == "--exclude") ? "exclude" : "include"
|
|
168
170
|
|
data/bin/verify_kafka_warnings
CHANGED
data/config/locales/errors.yml
CHANGED
|
@@ -26,6 +26,7 @@ en:
|
|
|
26
26
|
non_reloadable_errors_format: must be an array of symbols
|
|
27
27
|
oauth.token_provider_listener_format: 'must be false or respond to #on_oauthbearer_token_refresh'
|
|
28
28
|
idle_disconnect_timeout_format: 'must be an integer that is equal to 0 or bigger than 30 000 (30 seconds)'
|
|
29
|
+
statistics_decorator_format: 'must respond to #call'
|
|
29
30
|
polling.mode_format: must be :thread or :fd
|
|
30
31
|
polling.poller_format: must be nil or a WaterDrop::Polling::Poller instance
|
|
31
32
|
polling.poller_poller_only_with_fd_mode: can only be set when polling.mode is :fd
|
|
@@ -60,6 +61,11 @@ en:
|
|
|
60
61
|
headers_invalid_key_type: all headers keys need to be of type String
|
|
61
62
|
headers_invalid_value_type: all headers values need to be strings or arrays of strings
|
|
62
63
|
|
|
64
|
+
tombstone:
|
|
65
|
+
missing: must be present
|
|
66
|
+
key_format: must be a non-empty string
|
|
67
|
+
partition_format: must be an integer greater or equal to 0
|
|
68
|
+
|
|
63
69
|
transactional_offset:
|
|
64
70
|
consumer_format: 'must respond to #consumer_group_metadata_pointer method'
|
|
65
71
|
message_format: 'must respond to #topic, #partition and #offset'
|
data/docker-compose.oauth.yml
CHANGED
|
@@ -9,7 +9,7 @@ services:
|
|
|
9
9
|
KEYCLOAK_ADMIN: admin
|
|
10
10
|
KEYCLOAK_ADMIN_PASSWORD: admin
|
|
11
11
|
volumes:
|
|
12
|
-
- ./
|
|
12
|
+
- ./test/integrations/oauth_token_refresh/keycloak-realm.json:/opt/keycloak/data/import/realm.json
|
|
13
13
|
healthcheck:
|
|
14
14
|
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/8080 && echo -e 'GET /realms/kafka HTTP/1.1\\r\\nHost: localhost\\r\\n\\r\\n' >&3 && timeout 1 cat <&3 | grep -q '200 OK'"]
|
|
15
15
|
interval: 10s
|
|
@@ -18,7 +18,7 @@ services:
|
|
|
18
18
|
start_period: 90s
|
|
19
19
|
|
|
20
20
|
kafka-oauth:
|
|
21
|
-
image: confluentinc/cp-kafka:8.
|
|
21
|
+
image: confluentinc/cp-kafka:8.2.0
|
|
22
22
|
container_name: kafka-oauth
|
|
23
23
|
depends_on:
|
|
24
24
|
keycloak:
|
|
@@ -53,4 +53,4 @@ services:
|
|
|
53
53
|
# Also allow HTTP URLs for JWKS endpoint (Kafka 3.0+ blocks non-HTTPS by default)
|
|
54
54
|
KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/kafka_server_jaas.conf -Dorg.apache.kafka.sasl.oauthbearer.allowed.urls=http://keycloak:8080/realms/kafka/protocol/openid-connect/certs"
|
|
55
55
|
volumes:
|
|
56
|
-
- ./
|
|
56
|
+
- ./test/integrations/oauth_token_refresh/kafka_server_jaas.conf:/etc/kafka/kafka_server_jaas.conf:ro
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
services:
|
|
2
|
+
kafka-sasl:
|
|
3
|
+
image: confluentinc/cp-kafka:8.2.0
|
|
4
|
+
container_name: kafka-sasl
|
|
5
|
+
ports:
|
|
6
|
+
- "9095:9095"
|
|
7
|
+
environment:
|
|
8
|
+
CLUSTER_ID: kafka-sasl-cluster-1
|
|
9
|
+
KAFKA_BROKER_ID: 1
|
|
10
|
+
KAFKA_PROCESS_ROLES: broker,controller
|
|
11
|
+
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka-sasl:9093
|
|
12
|
+
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
|
|
13
|
+
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
|
|
14
|
+
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093,SASL_PLAINTEXT://:9095
|
|
15
|
+
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-sasl:9092,SASL_PLAINTEXT://127.0.0.1:9095
|
|
16
|
+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SASL_PLAINTEXT:SASL_PLAINTEXT
|
|
17
|
+
KAFKA_SASL_ENABLED_MECHANISMS: PLAIN
|
|
18
|
+
KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: PLAINTEXT
|
|
19
|
+
KAFKA_LISTENER_NAME_SASL__PLAINTEXT_PLAIN_SASL_JAAS_CONFIG: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="admin" password="admin-secret" user_admin="admin-secret" user_testuser="testuser-secret";'
|
|
20
|
+
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
|
|
21
|
+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
|
22
|
+
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
|
|
23
|
+
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
|
|
24
|
+
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
|
|
25
|
+
KAFKA_AUTHORIZER_CLASS_NAME: org.apache.kafka.metadata.authorizer.StandardAuthorizer
|
|
26
|
+
KAFKA_OPTS: ""
|