karafka-web 0.9.0.rc3 → 0.9.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: 7b9269c18c046b827e3637a81ffbf7628b34406aebf35acd1fb110d96cadc45f
4
- data.tar.gz: f7a0813ae649545ca5693963d317f361f687b6a53ca26f364900b48b1ab4f13d
3
+ metadata.gz: ce075ec71d155adbf35706c5bfa9beab07a707970e53ad9b0f7e6b2fc2196976
4
+ data.tar.gz: 747b28ece60db10c34cabfcaa70edcc8d7c0aaa63440c6b3dba6b108a35a0435
5
5
  SHA512:
6
- metadata.gz: a9e3ed0e1851d5d832c3777fb83f36d018f9bd8f17db8a6234cc2b7ceaf60bd3ebaf0c1f889433b91d0949d60bbd985ac0f8463fde29a298beb7cea0af6e9722
7
- data.tar.gz: 0d98ba7bb80eb6d60dc9bfed4928ce4d85b9c9497482d5273cacd14656740eba36a00cd767d09fab10cd47b5320a32759d4014d7e65b0a0f14e9e7459f6a023b
6
+ metadata.gz: 39d4e856b439c83acc929cf17432c52abbbf4c2a063897b0595ed360321fc0cafb62527e5d99f35710d9d731accbd12aaca9a8c0a6c97ead1d5302df1fd400dd
7
+ data.tar.gz: fc8eb8d769bc3dd9edeca90fedb05c83ce382c562f26b261290a352f04f09ffc029bdb21627bc6d305924b5673ed8465631d6a60d58c486575b24055f7255c9e
checksums.yaml.gz.sig CHANGED
Binary file
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.0
1
+ 3.3.1
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Karafka Web changelog
2
2
 
3
- ## 0.9.0 (Unreleased)
3
+ ## 0.9.1 (2024-05-03)
4
+ - [Fix] OSS `lag_stored` for not-subscribed consumers causes Web UI to crash.
5
+
6
+ ## 0.9.0 (2024-04-26)
4
7
  - **[Breaking]** Drop Ruby `2.7` support.
5
8
  - **[Feature]** Provide ability to stop and quiet running consumers (Pro).
6
9
  - **[Feature]** Provide ability to probe (get backtraces) of any running consumer (Pro).
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka-web (0.9.0.rc3)
4
+ karafka-web (0.9.1)
5
5
  erubi (~> 1.4)
6
- karafka (>= 2.4.0.rc1, < 2.5.0)
7
- karafka-core (>= 2.4.0.rc2, < 2.5.0)
6
+ karafka (>= 2.4.0, < 2.5.0)
7
+ karafka-core (>= 2.4.0, < 2.5.0)
8
8
  roda (~> 3.68, >= 3.69)
9
9
  tilt (~> 2.0)
10
10
 
@@ -35,17 +35,17 @@ GEM
35
35
  ffi (1.16.3)
36
36
  i18n (1.14.4)
37
37
  concurrent-ruby (~> 1.0)
38
- karafka (2.4.0.rc1)
39
- karafka-core (>= 2.4.0.rc2, < 2.5.0)
40
- waterdrop (>= 2.7.0.rc2, < 3.0.0)
38
+ karafka (2.4.0)
39
+ karafka-core (>= 2.4.0, < 2.5.0)
40
+ waterdrop (>= 2.7.0, < 3.0.0)
41
41
  zeitwerk (~> 2.3)
42
- karafka-core (2.4.0.rc2)
43
- karafka-rdkafka (>= 0.15.0.rc2, < 0.16.0)
44
- karafka-rdkafka (0.15.0.rc2)
42
+ karafka-core (2.4.0)
43
+ karafka-rdkafka (>= 0.15.0, < 0.16.0)
44
+ karafka-rdkafka (0.15.0)
45
45
  ffi (~> 1.15)
46
46
  mini_portile2 (~> 2.6)
47
47
  rake (> 12)
48
- mini_portile2 (2.8.5)
48
+ mini_portile2 (2.8.6)
49
49
  minitest (5.22.3)
50
50
  mutex_m (0.2.0)
51
51
  rack (3.0.10)
@@ -54,8 +54,8 @@ GEM
54
54
  rackup (0.2.3)
55
55
  rack (>= 3.0.0.beta1)
56
56
  webrick
57
- rake (13.1.0)
58
- roda (3.78.0)
57
+ rake (13.2.1)
58
+ roda (3.79.0)
59
59
  rack
60
60
  rspec (3.13.0)
61
61
  rspec-core (~> 3.13.0)
@@ -79,8 +79,8 @@ GEM
79
79
  tilt (2.3.0)
80
80
  tzinfo (2.0.6)
81
81
  concurrent-ruby (~> 1.0)
82
- waterdrop (2.7.0.rc2)
83
- karafka-core (>= 2.4.0.rc2, < 3.0.0)
82
+ waterdrop (2.7.0)
83
+ karafka-core (>= 2.4.0, < 3.0.0)
84
84
  zeitwerk (~> 2.3)
85
85
  webrick (1.8.1)
86
86
  zeitwerk (2.6.13)
@@ -99,4 +99,4 @@ DEPENDENCIES
99
99
  simplecov
100
100
 
101
101
  BUNDLED WITH
102
- 2.5.7
102
+ 2.5.9
@@ -40,19 +40,19 @@ en:
40
40
  - "Looking for better message management? Enhanced Dead Letter Queue in Karafka Pro is key."
41
41
  - "Concerned about Karafka licensing? Karafka Pro offers a commercial-friendly option."
42
42
  - "Need coupled message operations? Transactions in Karafka Pro enhance data integrity."
43
- - "Are you Concerned about managing large data flows? Virtual Partitions in Karafka Pro simplify data processing, offering unparalleled efficiency and scalability."
44
- - "Looking for flexible scheduling solutions? Karafka's Pro Periodic Jobs feature allows for precise task timing and execution, enhancing your application's performance and reliability."
43
+ - "Are you concerned about managing large data flows? Virtual Partitions in Karafka Pro simplify data processing, offering unparalleled efficiency and scalability."
44
+ - "Looking for flexible scheduling solutions? Karafka's Pro Periodic Jobs feature allows precise task timing and execution, enhancing your application's performance and reliability."
45
45
  - "Need advanced routing capabilities? Routing Patterns in Karafka Pro provide dynamic message routing, improving your system's adaptability and efficiency."
46
- - "Are you Seeking to control your workload? With Rate Limiting in Karafka Pro, you can manage and balance your system's load effectively, ensuring optimal performance under any conditions."
46
+ - "Are you Seeking to control your workload? With Rate Limiting in Karafka Pro, you can effectively manage and balance your system's load, ensuring optimal performance under any conditions."
47
47
  - "Need quick data access methods? The Iterator API in Karafka Pro provides efficient data retrieval methods."
48
- - "Want more nuanced error handling? Discover Granular Backoffs in Karafka Pro, allowing for detailed control over retry mechanisms and error recovery processes."
48
+ - "Want more nuanced error handling? Discover Granular Backoffs in Karafka Pro, which allows for detailed control over retry mechanisms and error recovery processes."
49
49
  - "Need a boost in data processing speed? Multiplexing in Karafka Pro enables parallel processing, significantly increasing throughput and reducing processing times."
50
50
  - "Need advanced monitoring and management? Karafka Pro goes beyond basic features, offering comprehensive tools for detailed insight and control over your Kafka ecosystem."
51
51
  - "Let's Build the Future of Karafka Together: Your Pro support brings next-gen features to life."
52
52
  - "Karafka Pro: A Partnership for Progress. Your subscription drives our development."
53
- - "With Karafka Pro, you're not just upgrading, you're fueling the future of efficient coding."
53
+ - "With Karafka Pro, you're not just upgrading; you're fueling the future of efficient coding."
54
54
  - "Dare to Support, Dare to Grow: Karafka Pro is your contribution to a boundary-pushing ecosystem."
55
- - "Ivest in Karafka Pro to ensure ongoing enhancements and a dynamic, evolving platform."
55
+ - "Invest in Karafka Pro to ensure ongoing enhancements and a dynamic, evolving platform."
56
56
  - "Advance with us. Your Karafka Pro subscription is a stepping stone for collective innovation."
57
57
  - "Together, we can push boundaries. Support Karafka's growth by upgrading to Pro."
58
58
  - "Karafka's continuous improvement is powered by our community. Consider going Pro to contribute."
data/karafka-web.gemspec CHANGED
@@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.licenses = %w[LGPL-3.0 Commercial]
18
18
 
19
19
  spec.add_dependency 'erubi', '~> 1.4'
20
- spec.add_dependency 'karafka', '>= 2.4.0.rc1', '< 2.5.0'
21
- spec.add_dependency 'karafka-core', '>= 2.4.0.rc2', '< 2.5.0'
20
+ spec.add_dependency 'karafka', '>= 2.4.0', '< 2.5.0'
21
+ spec.add_dependency 'karafka-core', '>= 2.4.0', '< 2.5.0'
22
22
  spec.add_dependency 'roda', '~> 3.68', '>= 3.69'
23
23
  spec.add_dependency 'tilt', '~> 2.0'
24
24
 
@@ -102,7 +102,7 @@ module Karafka
102
102
  {
103
103
  'cleanup.policy': 'delete',
104
104
  'retention.ms': 7 * 24 * 60 * 60 * 1_000, # 7 days
105
- 'segment.ms': 12 * 60 * 60 * 1_000, # 24h
105
+ 'segment.ms': 24 * 60 * 60 * 1_000, # 1 day
106
106
  'segment.bytes': 104_857_600 # 100MB
107
107
  }
108
108
  )
@@ -31,11 +31,9 @@ module Karafka
31
31
  # @param process_id [String] id of the process. We use name instead of id only
32
32
  # because in the web ui we work with the full name and it is easier. Since
33
33
  def command(name, process_id)
34
- producer.produce_async(
35
- topic: commands_topic,
36
- key: process_id,
37
- partition: 0,
38
- payload: {
34
+ produce(
35
+ process_id,
36
+ {
39
37
  schema_version: SCHEMA_VERSION,
40
38
  type: 'command',
41
39
  command: {
@@ -45,7 +43,7 @@ module Karafka
45
43
  process: {
46
44
  id: process_id
47
45
  }
48
- }.to_json
46
+ }
49
47
  )
50
48
  end
51
49
 
@@ -55,11 +53,9 @@ module Karafka
55
53
  # @param process_id [String] related process id
56
54
  # @param command_name [String, Symbol] command that triggered this result
57
55
  def result(result, process_id, command_name)
58
- producer.produce_async(
59
- topic: commands_topic,
60
- key: process_id,
61
- partition: 0,
62
- payload: {
56
+ produce(
57
+ process_id,
58
+ {
63
59
  schema_version: SCHEMA_VERSION,
64
60
  type: 'result',
65
61
  command: {
@@ -70,7 +66,7 @@ module Karafka
70
66
  process: {
71
67
  id: process_id
72
68
  }
73
- }.to_json
69
+ }
74
70
  )
75
71
  end
76
72
 
@@ -85,6 +81,20 @@ module Karafka
85
81
  def commands_topic
86
82
  ::Karafka::Web.config.topics.consumers.commands
87
83
  end
84
+
85
+ # Converts payload to json, compresses it and dispatches to Kafka
86
+ #
87
+ # @param payload [Hash] hash with payload
88
+ # @param process_id [String]
89
+ def produce(process_id, payload)
90
+ producer.produce_async(
91
+ topic: commands_topic,
92
+ key: process_id,
93
+ partition: 0,
94
+ payload: ::Zlib::Deflate.deflate(payload.to_json),
95
+ headers: { 'zlib' => 'true' }
96
+ )
97
+ end
88
98
  end
89
99
  end
90
100
  end
@@ -262,15 +262,15 @@ module Karafka
262
262
  r.on 'topics' do
263
263
  controller = Controllers::TopicsController.new(params)
264
264
 
265
- r.get 'config', String do |topic_name|
265
+ r.get String, 'config' do |topic_name|
266
266
  controller.config(topic_name)
267
267
  end
268
268
 
269
- r.get 'replication', String do |topic_name|
269
+ r.get String, 'replication' do |topic_name|
270
270
  controller.replication(topic_name)
271
271
  end
272
272
 
273
- r.get 'distribution', String do |topic_name|
273
+ r.get String, 'distribution' do |topic_name|
274
274
  controller.distribution(topic_name)
275
275
  end
276
276
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  <% if @topic %>
8
8
  <li class="breadcrumb-item">
9
- <a href="<%= root_path('topics', 'config', @topic.topic_name) %>">
9
+ <a href="<%= root_path('topics', @topic.topic_name, 'config') %>">
10
10
  <%= @topic.topic_name %>
11
11
  </a>
12
12
  </li>
@@ -14,7 +14,7 @@
14
14
 
15
15
  <% if @configs %>
16
16
  <li class="breadcrumb-item">
17
- <a href="<%= root_path('topics', 'config', @topic.topic_name) %>">
17
+ <a href="<%= root_path('topics', @topic.topic_name, 'config') %>">
18
18
  Configuration
19
19
  </a>
20
20
  </li>
@@ -22,7 +22,7 @@
22
22
 
23
23
  <% if @partitions %>
24
24
  <li class="breadcrumb-item">
25
- <a href="<%= root_path('topics', 'replication', @topic.topic_name) %>">
25
+ <a href="<%= root_path('topics', @topic.topic_name, 'replication') %>">
26
26
  Replication
27
27
  </a>
28
28
  </li>
@@ -30,7 +30,7 @@
30
30
 
31
31
  <% if @distribution %>
32
32
  <li class="breadcrumb-item">
33
- <a href="<%= root_path('topics', 'distribution', @topic.topic_name) %>">
33
+ <a href="<%= root_path('topics', @topic.topic_name, 'distribution') %>">
34
34
  Distribution
35
35
  </a>
36
36
  </li>
@@ -5,8 +5,8 @@
5
5
  <ul class="nav nav-tabs">
6
6
  <li class="nav-item">
7
7
  <a
8
- class="nav-link <%= nav_class(include: 'config') %>"
9
- href="<%= root_path('topics', 'config', @topic.topic_name) %>"
8
+ class="nav-link <%= nav_class(end_with: 'config') %>"
9
+ href="<%= root_path('topics', @topic.topic_name, 'config') %>"
10
10
  >
11
11
  Configuration
12
12
  </a>
@@ -14,8 +14,8 @@
14
14
 
15
15
  <li class="nav-item">
16
16
  <a
17
- class="nav-link <%= nav_class(include: 'replication') %>"
18
- href="<%= root_path('topics', 'replication', @topic.topic_name) %>"
17
+ class="nav-link <%= nav_class(end_with: 'replication') %>"
18
+ href="<%= root_path('topics', @topic.topic_name, 'replication') %>"
19
19
  >
20
20
  Replication
21
21
  </a>
@@ -23,8 +23,8 @@
23
23
 
24
24
  <li class="nav-item">
25
25
  <a
26
- class="nav-link <%= nav_class(include: 'distribution') %>"
27
- href="<%= root_path('topics', 'distribution', @topic.topic_name) %>"
26
+ class="nav-link <%= nav_class(end_with: 'distribution') %>"
27
+ href="<%= root_path('topics', @topic.topic_name, 'distribution') %>"
28
28
  >
29
29
  Distribution
30
30
  </a>
@@ -2,7 +2,7 @@
2
2
  <div class="card" >
3
3
  <div class="card-body p-2">
4
4
  <p class="card-text mb-0 p-2">
5
- <a href="<%= root_path('topics', 'config', topic.topic_name) %>">
5
+ <a href="<%= root_path('topics', topic.topic_name, 'config') %>">
6
6
  <%= topic.topic_name %> /
7
7
  <%= topic.partition_count %>
8
8
  </a>
@@ -35,6 +35,6 @@
35
35
  </td>
36
36
 
37
37
  <td>
38
- <%= process.lag_stored %>
38
+ <%= process.lag_hybrid %>
39
39
  </td>
40
40
  </tr>
@@ -3,6 +3,6 @@
3
3
  module Karafka
4
4
  module Web
5
5
  # Current gem version
6
- VERSION = '0.9.0.rc3'
6
+ VERSION = '0.9.1'
7
7
  end
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0.rc3
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -35,7 +35,7 @@ cert_chain:
35
35
  AnG1dJU+yL2BK7vaVytLTstJME5mepSZ46qqIJXMuWob/YPDmVaBF39TDSG9e34s
36
36
  msG3BiCqgOgHAnL23+CN3Rt8MsuRfEtoTKpJVcCfoEoNHOkc
37
37
  -----END CERTIFICATE-----
38
- date: 2024-04-18 00:00:00.000000000 Z
38
+ date: 2024-05-03 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: erubi
@@ -57,7 +57,7 @@ dependencies:
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 2.4.0.rc1
60
+ version: 2.4.0
61
61
  - - "<"
62
62
  - !ruby/object:Gem::Version
63
63
  version: 2.5.0
@@ -67,7 +67,7 @@ dependencies:
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: 2.4.0.rc1
70
+ version: 2.4.0
71
71
  - - "<"
72
72
  - !ruby/object:Gem::Version
73
73
  version: 2.5.0
@@ -77,7 +77,7 @@ dependencies:
77
77
  requirements:
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: 2.4.0.rc2
80
+ version: 2.4.0
81
81
  - - "<"
82
82
  - !ruby/object:Gem::Version
83
83
  version: 2.5.0
@@ -87,7 +87,7 @@ dependencies:
87
87
  requirements:
88
88
  - - ">="
89
89
  - !ruby/object:Gem::Version
90
- version: 2.4.0.rc2
90
+ version: 2.4.0
91
91
  - - "<"
92
92
  - !ruby/object:Gem::Version
93
93
  version: 2.5.0
@@ -588,7 +588,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
588
588
  - !ruby/object:Gem::Version
589
589
  version: '0'
590
590
  requirements: []
591
- rubygems_version: 3.5.3
591
+ rubygems_version: 3.5.9
592
592
  signing_key:
593
593
  specification_version: 4
594
594
  summary: Karafka ecosystem Web UI interface
metadata.gz.sig CHANGED
Binary file