karafka 2.1.2 → 2.1.4

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: 79ce608360e19cbc8ec133decd7630b6b4188b17b41ae3d936d732bb8a8298d2
4
- data.tar.gz: 12a0dc8d6b6b3969fe4b1b98b0c73bcf148569011c4429b01dc2a61d970d77ce
3
+ metadata.gz: e54dc80fd5a3a93857fd6a3a175030f7cb2eee1f77668d6936b705b0789c4228
4
+ data.tar.gz: e7f3b02811432987048bc599c2c4a6f0444fe13d98ca4aa8e87cebd5aaa8037a
5
5
  SHA512:
6
- metadata.gz: 7863261c75047221d08525bec6e6c65a9a65be48529305f0a754a247ec48c50105e7213d62d637cc5f3036b4054043983dd2fc556fc83c29c1625599139c100b
7
- data.tar.gz: 74109272f65bee2f97a3076721e53ff90d6d718177a0edda86ca1fa321ef16daa02b9e952cc40a07dde60ac9fa33e6557e2b3ebb1b3d4b31258217ea9b0b0792
6
+ metadata.gz: 871ed7a55421041b1b232c47b3da0f625b8f2114c00057daf883223d3da4dc16637c9f0b4714cebe4a5f33249beac9bd7abbe15ec122f5b1a45a3c953dcb1465
7
+ data.tar.gz: ac2cc50c3277bd0bac7e3a2af40cc6d5a9c3aa92fc8cc3d2b12b8645329d269d0ed0d80c462d2fa6a03a677213e84802a1dfe8fdc1c494348b1a8b4fd9ef8459
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Karafka framework changelog
2
2
 
3
+ ## 2.1.4 (2023-06-06)
4
+ - [Fix] `processing_lag` and `consumption_lag` on empty batch fail on shutdown usage (#1475)
5
+
6
+ ## 2.1.3 (2023-05-29)
7
+ - [Maintenance] Add linter to ensure, that all integration specs end with `_spec.rb`.
8
+ - [Fix] Fix `#retrying?` helper result value (Aerdayne).
9
+ - [Fix] Fix `mark_as_consumed!` raising an error instead of `false` on `unknown_member_id` (#1461).
10
+ - [Fix] Enable phantom tests.
11
+
3
12
  ## 2.1.2 (2023-05-26)
4
13
  - Set minimum `karafka-core` on `2.0.13` to make sure correct version of `karafka-rdkafka` is used.
5
14
  - Set minimum `waterdrop` on `2.5.3` to make sure correct version of `waterdrop` is used.
@@ -8,7 +17,7 @@
8
17
  - [Fix] Liveness Probe Doesn't Meet HTTP 1.1 Criteria - Causing Kubernetes Restarts (#1450)
9
18
 
10
19
  ## 2.1.0 (2023-05-22)
11
- - **[Feature]** Provide ability to use CurrentAttributes with ActiveJob's Karafka adapter.
20
+ - **[Feature]** Provide ability to use CurrentAttributes with ActiveJob's Karafka adapter (federicomoretti).
12
21
  - **[Feature]** Introduce collective Virtual Partitions offset management.
13
22
  - **[Feature]** Use virtual offsets to filter out messages that would be re-processed upon retries.
14
23
  - [Improvement] No longer break processing on failing parallel virtual partitions in ActiveJob because it is compensated by virtual marking.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka (2.1.2)
4
+ karafka (2.1.4)
5
5
  karafka-core (>= 2.0.13, < 3.0.0)
6
6
  thor (>= 0.20)
7
7
  waterdrop (>= 2.5.3, < 3.0.0)
data/README.md CHANGED
@@ -59,8 +59,8 @@ We also maintain many [integration specs](https://github.com/karafka/karafka/tre
59
59
  1. Add and install Karafka:
60
60
 
61
61
  ```bash
62
- # Make sure to install Karafka 2.0
63
- bundle add karafka --version ">= 2.0.28"
62
+ # Make sure to install Karafka 2.1
63
+ bundle add karafka --version ">= 2.1.2"
64
64
 
65
65
  bundle exec karafka install
66
66
  ```
@@ -225,7 +225,7 @@ module Karafka
225
225
  # different flow after there is an error, for example for resources cleanup, small manual
226
226
  # backoff or different instrumentation tracking.
227
227
  def retrying?
228
- coordinator.pause_tracker.attempt.positive?
228
+ coordinator.pause_tracker.attempt > 1
229
229
  end
230
230
 
231
231
  # Pauses the processing from the last offset to retry on given message
@@ -305,6 +305,8 @@ module Karafka
305
305
  case e.code
306
306
  when :assignment_lost
307
307
  return false
308
+ when :unknown_member_id
309
+ return false
308
310
  when :no_offset
309
311
  return true
310
312
  when :coordinator_load_in_progress
@@ -20,14 +20,21 @@ module Karafka
20
20
  ) do
21
21
  # This lag describes how long did it take for a message to be consumed from the moment it was
22
22
  # created
23
+ #
24
+ #
25
+ # @return [Integer] number of milliseconds
26
+ # @note In case of usage in workless flows, this value will be set to -1
23
27
  def consumption_lag
24
- time_distance_in_ms(processed_at, created_at)
28
+ processed_at ? time_distance_in_ms(processed_at, created_at) : -1
25
29
  end
26
30
 
27
31
  # This lag describes how long did a batch have to wait before it was picked up by one of the
28
32
  # workers
33
+ #
34
+ # @return [Integer] number of milliseconds
35
+ # @note In case of usage in workless flows, this value will be set to -1
29
36
  def processing_lag
30
- time_distance_in_ms(processed_at, scheduled_at)
37
+ processed_at ? time_distance_in_ms(processed_at, scheduled_at) : -1
31
38
  end
32
39
 
33
40
  private
@@ -3,5 +3,5 @@
3
3
  # Main module namespace
4
4
  module Karafka
5
5
  # Current Karafka version
6
- VERSION = '2.1.2'
6
+ VERSION = '2.1.4'
7
7
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -35,7 +35,7 @@ cert_chain:
35
35
  Qf04B9ceLUaC4fPVEz10FyobjaFoY4i32xRto3XnrzeAgfEe4swLq8bQsR3w/EF3
36
36
  MGU0FeSV2Yj7Xc2x/7BzLK8xQn5l7Yy75iPF+KP3vVmDHnNl
37
37
  -----END CERTIFICATE-----
38
- date: 2023-05-26 00:00:00.000000000 Z
38
+ date: 2023-06-06 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: karafka-core
metadata.gz.sig CHANGED
Binary file