Skip to content

Commit

Permalink
Require new karafka (#508)
Browse files Browse the repository at this point in the history
* require karafka 2.4.17

* remove legacy code
  • Loading branch information
mensfeld authored Jan 15, 2025
1 parent ee51a05 commit 0acaa0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PATH
specs:
karafka-web (0.11.0)
erubi (~> 1.4)
karafka (>= 2.4.15, < 2.5.0)
karafka (>= 2.4.17, < 2.5.0)
karafka-core (>= 2.4.8, < 2.5.0)
roda (~> 3.68, >= 3.69)
tilt (~> 2.0)
Expand Down Expand Up @@ -41,7 +41,7 @@ GEM
raabro (~> 1.4)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
karafka (2.4.16)
karafka (2.4.17)
base64 (~> 0.2)
karafka-core (>= 2.4.4, < 2.5.0)
karafka-rdkafka (>= 0.17.2)
Expand Down
2 changes: 1 addition & 1 deletion karafka-web.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
spec.licenses = %w[LGPL-3.0-only Commercial]

spec.add_dependency 'erubi', '~> 1.4'
spec.add_dependency 'karafka', '>= 2.4.15', '< 2.5.0'
spec.add_dependency 'karafka', '>= 2.4.17', '< 2.5.0'
spec.add_dependency 'karafka-core', '>= 2.4.8', '< 2.5.0'
spec.add_dependency 'roda', '~> 3.68', '>= 3.69'
spec.add_dependency 'tilt', '~> 2.0'
Expand Down
8 changes: 1 addition & 7 deletions lib/karafka/web/pro/ui/lib/search/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ def initialize(topic, partitions_count, search_criteria)
@timeout = Web.config.ui.search.timeout
@stop_reason = nil
@matched = []
# Key and headers may be used when presenting the search results, thus we do not
# clean them. Payload is not presented in the search results so it can be removed
# Pre Karafka 2.4.17 do not support granular cleaning and would never clean
# metadata. This should be removed once the minimal version of Karafka required
# by Web UI is 2.4.17.
@full_cleaning = ::Karafka::Messages::Message.instance_method(:clean!).arity.zero?
end

# Runs the search, collects search statistics and returns the results
Expand Down Expand Up @@ -185,7 +179,7 @@ def search_with_stats
@totals_stats[:matched] += 1
end

@full_cleaning ? message.clean! : message.clean!(metadata: false)
message.clean!(metadata: false)
end

@stop_reason ||= :eof
Expand Down

0 comments on commit 0acaa0f

Please sign in to comment.