-
Notifications
You must be signed in to change notification settings - Fork 67
feat(wip): support latest versions of kafka protocol #141
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
base: master
Are you sure you want to change the base?
Conversation
6843b45
to
f4ba128
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #141 +/- ##
==========================================
- Coverage 80.03% 78.19% -1.84%
==========================================
Files 21 21
Lines 1703 2064 +361
==========================================
+ Hits 1363 1614 +251
- Misses 340 450 +110 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
%% @end | ||
%% Can not get dialyzer working for this call: | ||
%% kpro_req_lib:metadata(Vsn, [Topic]) | ||
-dialyzer([{nowarn_function, [discover_partition_leader/5]}]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe see if dialyzer works fine now.
%% @end | ||
%% Can not get dialyzer working for this call: | ||
%% kpro_req_lib:metadata(Vsn, [Topic]) | ||
-dialyzer([{nowarn_function, [discover_partition_leader/4]}]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe check if dialyzer works now
TopicId = | ||
case Vsn of | ||
V when V < 10 -> <<>>; | ||
_ -> kpro:find(topic_id, TopicMeta) | ||
end, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TopicId = | |
case Vsn of | |
V when V < 10 -> <<>>; | |
_ -> kpro:find(topic_id, TopicMeta) | |
end, | |
TopicId = kpro:find(topic_id, TopicMeta, <<>>) |
({_, V}) -> | ||
Fields = [ {key, Id}, {key_type, Type}], | ||
{ok, kpro:make_request(find_coordinator, V, Fields)} | ||
({_, V}) when V < 4 -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a macro for 4?
{rack_id, RackID} | ||
], | ||
make(fetch, Vsn, Fields). | ||
MaxWaitTime = maps:get(max_wait_time, Opts, timer:seconds(1)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation in this repo is 2, new code has 4
please try to keep the style unchanged.
end, | ||
Fields = | ||
case Vsn of | ||
V when V < 10 -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a macro for 10
case get_api_vsn_range(Connection, find_coordinator) of | ||
{error, Reason} -> | ||
{error, Reason}; | ||
{ok, {_, V}} when V < 4 -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use macro for 4?
%% Can not get dialyzer working for this call: | ||
%% kpro_req_lib:metadata(Vsn, [Topic]) | ||
-dialyzer([{nowarn_function, [discover_partition_leader/5]}]). | ||
-spec discover_partition_leader(connection(), topic(), partition(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment or variable name for the last arg ReturnTopicId :: boolean()
?
No description provided.