karafka 2.1.0 → 2.1.1

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: b3d0a2f78b4bf7fa8f49527d48d2e877b95597566e07beabf0166a02259a936b
4
- data.tar.gz: fc6054ad5f99bfe8a678c337167f93fc612dddfe88494f8891158dbd8610fb7f
3
+ metadata.gz: 717ad2fe9f79ab6d7b93606e7925864443c7e88b8e38137eb3d3d21bd9e41e19
4
+ data.tar.gz: 407550329413122f29aec13a11434ed3ac4313d96c6d32e060ffb5a857808120
5
5
  SHA512:
6
- metadata.gz: 0fb1fa88ef76ce81e145797a1364ac36bea2b94c47e733856cfd5ec9b37d0d9e2e984a3e4ef7fc36d2ac34c448e490cfdea4e10fae886cd80fb289798e55d308
7
- data.tar.gz: 68df2bc1edb9acccd45d32428b43fd5dee12b9333c6059c801aa4ac03b3b89c01e93e8ea4ebbb8021618447c1122c8c5df64afc86747d6f0deec0cf992237e82
6
+ metadata.gz: 2169d98260cdc35c18b47821467ecf62a85933615662593c739b4332047f78f5b64172f78464b4ae95d3ad1d28be705c5d76bc3638f06b5f526811c7134ed1a5
7
+ data.tar.gz: 2fbad6b508fabbd23cdaa4d20fc4ad983c1391d4e0bccd60aca5181c18387f31bedfb88801563887554e5f7ee6e58fd5b637ee6e452787ea6bb025a9fed52aa1
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Karafka framework changelog
2
2
 
3
+ ## 2.1.1 (2023-05-24)
4
+ - [Fix] Liveness Probe Doesn't Meet HTTP 1.1 Criteria - Causing Kubernetes Restarts (#1450)
5
+
3
6
  ## 2.1.0 (2023-05-22)
4
7
  - **[Feature]** Provide ability to use CurrentAttributes with ActiveJob's Karafka adapter.
5
8
  - **[Feature]** Introduce collective Virtual Partitions offset management.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka (2.1.0)
4
+ karafka (2.1.1)
5
5
  karafka-core (>= 2.0.12, < 3.0.0)
6
6
  thor (>= 0.20)
7
7
  waterdrop (>= 2.4.10, < 3.0.0)
@@ -28,34 +28,34 @@ GEM
28
28
  ffi (1.15.5)
29
29
  globalid (1.1.0)
30
30
  activesupport (>= 5.0)
31
- i18n (1.12.0)
31
+ i18n (1.13.0)
32
32
  concurrent-ruby (~> 1.0)
33
33
  karafka-core (2.0.12)
34
34
  concurrent-ruby (>= 1.1)
35
35
  karafka-rdkafka (>= 0.12.1)
36
- karafka-rdkafka (0.12.1)
36
+ karafka-rdkafka (0.12.2)
37
37
  ffi (~> 1.15)
38
38
  mini_portile2 (~> 2.6)
39
39
  rake (> 12)
40
- karafka-web (0.5.1)
40
+ karafka-web (0.5.2)
41
41
  erubi (~> 1.4)
42
42
  karafka (>= 2.0.40, < 3.0.0)
43
43
  karafka-core (>= 2.0.12, < 3.0.0)
44
44
  roda (~> 3.63)
45
45
  tilt (~> 2.0)
46
- mini_portile2 (2.8.1)
46
+ mini_portile2 (2.8.2)
47
47
  minitest (5.18.0)
48
48
  rack (3.0.7)
49
49
  rake (13.0.6)
50
- roda (3.67.0)
50
+ roda (3.68.0)
51
51
  rack
52
52
  rspec (3.12.0)
53
53
  rspec-core (~> 3.12.0)
54
54
  rspec-expectations (~> 3.12.0)
55
55
  rspec-mocks (~> 3.12.0)
56
- rspec-core (3.12.1)
56
+ rspec-core (3.12.2)
57
57
  rspec-support (~> 3.12.0)
58
- rspec-expectations (3.12.2)
58
+ rspec-expectations (3.12.3)
59
59
  diff-lcs (>= 1.2.0, < 2.0)
60
60
  rspec-support (~> 3.12.0)
61
61
  rspec-mocks (3.12.5)
@@ -68,17 +68,16 @@ GEM
68
68
  simplecov_json_formatter (~> 0.1)
69
69
  simplecov-html (0.12.3)
70
70
  simplecov_json_formatter (0.1.4)
71
- thor (1.2.1)
71
+ thor (1.2.2)
72
72
  tilt (2.1.0)
73
73
  tzinfo (2.0.6)
74
74
  concurrent-ruby (~> 1.0)
75
- waterdrop (2.5.1)
75
+ waterdrop (2.5.2)
76
76
  karafka-core (>= 2.0.12, < 3.0.0)
77
77
  zeitwerk (~> 2.3)
78
- zeitwerk (2.6.7)
78
+ zeitwerk (2.6.8)
79
79
 
80
80
  PLATFORMS
81
- arm64-darwin-21
82
81
  x86_64-linux
83
82
 
84
83
  DEPENDENCIES
@@ -91,4 +90,4 @@ DEPENDENCIES
91
90
  simplecov
92
91
 
93
92
  BUNDLED WITH
94
- 2.4.10
93
+ 2.4.12
@@ -18,6 +18,14 @@ module Karafka
18
18
  class LivenessListener
19
19
  include ::Karafka::Core::Helpers::Time
20
20
 
21
+ # All good with Karafka
22
+ OK_CODE = '204 No Content'
23
+
24
+ # Some timeouts, fail
25
+ FAIL_CODE = '500 Internal Server Error'
26
+
27
+ private_constant :OK_CODE, :FAIL_CODE
28
+
21
29
  # @param hostname [String, nil] hostname or nil to bind on all
22
30
  # @param port [Integer] TCP port on which we want to run our HTTP status server
23
31
  # @param consuming_ttl [Integer] time in ms after which we consider consumption hanging.
@@ -142,6 +150,8 @@ module Karafka
142
150
  client = @server.accept
143
151
  client.gets
144
152
  client.print "HTTP/1.1 #{status}\r\n"
153
+ client.print "Content-Type: text/plain\r\n"
154
+ client.print "\r\n"
145
155
  client.close
146
156
 
147
157
  true
@@ -154,10 +164,10 @@ module Karafka
154
164
  def status
155
165
  time = monotonic_now
156
166
 
157
- return '500' if @pollings.values.any? { |tick| (time - tick) > @polling_ttl }
158
- return '500' if @consumptions.values.any? { |tick| (time - tick) > @consuming_ttl }
167
+ return FAIL_CODE if @pollings.values.any? { |tick| (time - tick) > @polling_ttl }
168
+ return FAIL_CODE if @consumptions.values.any? { |tick| (time - tick) > @consuming_ttl }
159
169
 
160
- '204'
170
+ OK_CODE
161
171
  end
162
172
  end
163
173
  end
@@ -3,5 +3,5 @@
3
3
  # Main module namespace
4
4
  module Karafka
5
5
  # Current Karafka version
6
- VERSION = '2.1.0'
6
+ VERSION = '2.1.1'
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.0
4
+ version: 2.1.1
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-22 00:00:00.000000000 Z
38
+ date: 2023-05-24 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