Skip to content

Conversation

id
Copy link
Contributor

@id id commented Sep 9, 2025

No description provided.

@id id force-pushed the bump-kafka-clients-to-4.1 branch from 6843b45 to f4ba128 Compare September 17, 2025 14:48
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

❌ Patch coverage is 60.83333% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.19%. Comparing base (45b7899) to head (ae2f2cd).

Files with missing lines Patch % Lines
src/kpro_brokers.erl 43.75% 27 Missing ⚠️
src/kpro_req_lib.erl 80.39% 10 Missing ⚠️
src/kpro_txn_lib.erl 33.33% 8 Missing ⚠️
src/kpro.erl 0.00% 1 Missing ⚠️
src/kpro_rsp_lib.erl 50.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

%% @end
%% Can not get dialyzer working for this call:
%% kpro_req_lib:metadata(Vsn, [Topic])
-dialyzer([{nowarn_function, [discover_partition_leader/5]}]).
Copy link
Contributor

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]}]).
Copy link
Contributor

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

Comment on lines +194 to +198
TopicId =
case Vsn of
V when V < 10 -> <<>>;
_ -> kpro:find(topic_id, TopicMeta)
end,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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 ->
Copy link
Contributor

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)),
Copy link
Contributor

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 ->
Copy link
Contributor

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 ->
Copy link
Contributor

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(),
Copy link
Contributor

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() ?

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