Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 rebased #220

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft

V2 rebased #220

wants to merge 18 commits into from

Conversation

dorner
Copy link
Member

@dorner dorner commented May 31, 2024

Work in progress for 2.0 version of Deimos backed by Karafka. For more info, see #219 .

@dorner dorner requested a review from harsha-flipp May 31, 2024 19:01
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember you pointed out specific ruby version to be a requirement. Would it be useful to add it to gemspec as a requirement?
spec.required_ruby_version = '>= 3.0.0'

@@ -7,7 +7,6 @@ module Consume
# of messages to be handled at once
module BatchConsumption
extend ActiveSupport::Concern
include Phobos::BatchHandler
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are quite a few references to Phobos on sig/defs.rbs file. I believe they needs to be removed too.


expect(Deimos::Logging).
to receive(:log_info).
with(hash_including(payload_keys: ["1", "2"]))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it 'should log message identifiers'. The expectation does not seem to test the message_id part and removes it.

I think the title should change if you say that this is the correct way in v2.

@@ -159,12 +158,6 @@ Metrics/AbcSize:
- 'lib/deimos/utils/schema_controller_mixin.rb'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline_consumer and schema_controller_mixin can be removed as the files are removed in the PR.

    - 'lib/deimos/utils/inline_consumer.rb'
    - 'lib/deimos/utils/schema_controller_mixin.rb'

# @param handler_class [Class]
# @return [String,nil]
def topic_for_consumer(handler_class)
Deimos.karafka_configs.each do |topic|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this not karafka_configs.each like in the above method? They both should be referring to the same method, isn't it?

    def karafka_config_for(topic: nil, producer: nil)
      if topic
        karafka_configs.find { |t| t.name == topic}
      elsif producer
        karafka_configs.find { |t| t.producer_class == producer}
      end
    end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants