karafka-core 2.5.12 → 2.5.13
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/.github/workflows/ci.yml +3 -3
- data/.github/workflows/push.yml +2 -2
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/karafka/core/monitoring/statistics_decorator.rb +14 -4
- data/lib/karafka/core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4b7b0d02f8480d00419f928a4fd78f6159e4d7fdb24cae7d426141c7b38c5eb1
|
|
4
|
+
data.tar.gz: 45077c9e98c506d1f2e40c82b81548bebf7105ba606dedda2cc2a3eae43a0679
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: faeb1f7ceed771456e3b6c2864042efe95d1a398969987873d8fe9773d8bda46bf2f16fddc4e4da9dced9f96d1fa17de3924cd0723e3f4a7f92c31d82be00b13
|
|
7
|
+
data.tar.gz: 064c8be576d37001c06cb13d6694b1e044662c76867a625db52a9551dcc00cc0f2be67cc01497979be3025bc837e0282e596c27949bc9f8d085dca939c46d961
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
|
|
38
38
|
|
|
39
39
|
- name: Set up Ruby
|
|
40
|
-
uses: ruby/setup-ruby@
|
|
40
|
+
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
|
|
41
41
|
with:
|
|
42
42
|
ruby-version: ${{matrix.ruby}}
|
|
43
43
|
bundler: 'latest'
|
|
@@ -69,7 +69,7 @@ jobs:
|
|
|
69
69
|
with:
|
|
70
70
|
fetch-depth: 0
|
|
71
71
|
- name: Set up Ruby
|
|
72
|
-
uses: ruby/setup-ruby@
|
|
72
|
+
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
|
|
73
73
|
with:
|
|
74
74
|
ruby-version: '4.0.2'
|
|
75
75
|
bundler-cache: true
|
|
@@ -86,7 +86,7 @@ jobs:
|
|
|
86
86
|
with:
|
|
87
87
|
fetch-depth: 0
|
|
88
88
|
- name: Set up Ruby
|
|
89
|
-
uses: ruby/setup-ruby@
|
|
89
|
+
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
|
|
90
90
|
with:
|
|
91
91
|
ruby-version: '4.0.2'
|
|
92
92
|
bundler-cache: true
|
data/.github/workflows/push.yml
CHANGED
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
fetch-depth: 0
|
|
25
25
|
|
|
26
26
|
- name: Set up Ruby
|
|
27
|
-
uses: ruby/setup-ruby@
|
|
27
|
+
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
|
|
28
28
|
with:
|
|
29
29
|
bundler-cache: false
|
|
30
30
|
|
|
@@ -32,4 +32,4 @@ jobs:
|
|
|
32
32
|
run: |
|
|
33
33
|
bundle install --jobs 4 --retry 3
|
|
34
34
|
|
|
35
|
-
- uses: rubygems/release-gem@
|
|
35
|
+
- uses: rubygems/release-gem@6317d8d1f7e28c24d28f6eff169ea854948bd9f7 # v1.2.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Karafka Core Changelog
|
|
2
2
|
|
|
3
|
+
## 2.5.13 (2026-04-08)
|
|
4
|
+
- [Enhancement] Extract `decorate_partitions` method from `StatisticsDecorator` to allow subclasses to filter which partitions are decorated (e.g. skip unassigned partitions in a consumer context).
|
|
5
|
+
|
|
3
6
|
## 2.5.12 (2026-04-02)
|
|
4
7
|
- [Fix] Exclude `test/` directory from gem releases to reduce package size.
|
|
5
8
|
|
data/Gemfile.lock
CHANGED
|
@@ -201,10 +201,7 @@ module Karafka
|
|
|
201
201
|
if partitions.is_a?(Hash)
|
|
202
202
|
prev_partitions = prev_topic["partitions"] || EMPTY_HASH
|
|
203
203
|
|
|
204
|
-
partitions
|
|
205
|
-
# Leaf level: no hash children, just decorate
|
|
206
|
-
decorate_keys(partition, prev_partitions[pid] || EMPTY_HASH, change_d)
|
|
207
|
-
end
|
|
204
|
+
decorate_partitions(partitions, prev_partitions, change_d)
|
|
208
205
|
end
|
|
209
206
|
end
|
|
210
207
|
end
|
|
@@ -248,6 +245,19 @@ module Karafka
|
|
|
248
245
|
end
|
|
249
246
|
end
|
|
250
247
|
|
|
248
|
+
# Decorates partitions within a topic. Extracted as a method so subclasses can
|
|
249
|
+
# override to filter which partitions are decorated (e.g. skip unassigned partitions
|
|
250
|
+
# in a consumer context).
|
|
251
|
+
#
|
|
252
|
+
# @param partitions [Hash] partition id => partition stats hash
|
|
253
|
+
# @param prev_partitions [Hash] previous partition stats
|
|
254
|
+
# @param change_d [Integer] time delta in ms
|
|
255
|
+
def decorate_partitions(partitions, prev_partitions, change_d)
|
|
256
|
+
partitions.each_pair do |pid, partition|
|
|
257
|
+
decorate_keys(partition, prev_partitions[pid] || EMPTY_HASH, change_d)
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
|
|
251
261
|
# Decorates only the keys listed in @only_keys via direct hash access.
|
|
252
262
|
# No iteration over the full hash, no type checking on non-target keys.
|
|
253
263
|
#
|
data/lib/karafka/core/version.rb
CHANGED