-
Notifications
You must be signed in to change notification settings - Fork 861
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
KIP 848 ListGroups API #2245
base: dev_fix_formatting
Are you sure you want to change the base?
KIP 848 ListGroups API #2245
Conversation
8e1d351
to
385429a
Compare
* rebase commit * change
@@ -742,7 +748,7 @@ long least_significant_bits | |||
/* rd_kafka_ConfigEntry_t * */ IntPtr entry); | |||
|
|||
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] | |||
internal static extern IntPtr rd_kafka_ConfigEntry_is_synonym ( | |||
internal static extern IntPtr rd_kafka_ConfigEntry_is_synonym( |
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.
Can we remove the changes done by style fix at places which we don't intend to touch? It's unnecessarily increasing the diff size making it difficult to review the PR
* rebase commit * change
8452969
to
395328b
Compare
feature/ListGroupsAPI
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.
Please also make the CI pass, and confirm that you've manually tested the code locally.
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] | ||
internal static extern IntPtr rd_kafka_AdminOptions_set_match_consumer_group_types( | ||
IntPtr options, | ||
ConsumerGroupType[] groupTypes, | ||
UIntPtr groupTypesCnt); | ||
|
||
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)] | ||
internal static extern IntPtr rd_kafka_AdminOptions_set_match_consumer_group_types( | ||
IntPtr options, | ||
ConsumerGroupType[] groupTypes, | ||
UIntPtr groupTypesCnt); | ||
|
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.
Why is it defined two times? This is causing CI failure? Same in other NativeMethods files
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.
Actually these were due to rebasing of the "squash & merge" commits and these did not raise any merge conflict as well. So after local build/test and format, the last rebase messed these up. Would take care for next time !
var groupID = Guid.NewGuid().ToString(); | ||
var nonExistentGroupID = Guid.NewGuid().ToString(); |
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.
Renamed to groupId
and nonExistentGroupId
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.
ok
BootstrapServers = bootstrapServers | ||
}).Build()) | ||
{ | ||
var listOptionsWithTimeout = new Admin.ListConsumerGroupsOptions() { RequestTimeout = TimeSpan.FromSeconds(30) }; |
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.
Not being used
LogToFile("KIP 848 Admin operations changes still aren't " + | ||
"available"); | ||
LogToFile("start AdminClient_ListDescribeConsumerGroups with Consumer Protocol"); | ||
const string clientID = "test.client"; |
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.
clientId. Name variables using camelCase
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.
since it was id only then kept d capital as it is a short form. But will reflect this in the change.
if (!TestConsumerGroupProtocol.IsClassic()) | ||
{ | ||
LogToFile("KIP 848 Admin operations changes still aren't " + |
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.
Why was this removed?
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.
Because these will be operational once the PR goes in and even in preview mode if unsafe api kafka server setting is set, then these are operational.
@@ -63,16 +63,68 @@ private void checkConsumerGroupDescription( | |||
[Theory, MemberData(nameof(KafkaParameters))] | |||
public void AdminClient_ListDescribeConsumerGroups(string bootstrapServers) | |||
{ | |||
var groupID = Guid.NewGuid().ToString(); |
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.
Please add another similar test creating Classic
group
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.
Actually the way 848 integration testing work is that we run 2 instances of Semaphore CI where one version runs for all the test having no broker min version, so assume only classic group protocol is used.
Now currently semaphore will only run some parts of test that needs verifying which means with broker version > 3.8.0.0 and environment variable for the consumer group protocol chosen to be consumer type.
examples/AdminClient/Program.cs
Outdated
var groupTypesList = new List<ConsumerGroupType>(); | ||
var isType = false; | ||
var isState = false; | ||
for (int i = 0; i < commandArgs.Length; i++) |
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 foreach
like foreach (var t in commandArgs)
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.
ok
} | ||
else | ||
{ | ||
Console.WriteLine("usage: .. <bootstrapServers> list-consumer-groups [-states <match_state_1> <match_state_2> ... <match_state_N>] [-types <group_type_1> .. <group_type_M>]"); |
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.
Missing <timeout_seconds>
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.
None of the usage in codebase mentions timeout seconds.
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.
For the examples convention I am saying
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.
See the remove line 602(just below this comment), it had < timeout_seconds>
timeout = TimeSpan.FromSeconds(Int32.Parse(commandArgs[0])); | ||
if (isState) | ||
{ | ||
Console.WriteLine("usage: .. <bootstrapServers> list-consumer-groups [-states <match_state_1> <match_state_2> ... <match_state_N>] [-types <group_type_1> .. <group_type_M>]"); |
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.
Improve the error message, state that this was a Duplicate states argument. Same for types
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.
No the duplicate state is Invalid args but still the example will run and yield a error like Invalid args.
This is basically error with exit code so user has put in wrong input format for the example.
like -state_cnt=2 state_1 -group_type_cnt=..
The above will error because only 1 state was given.
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.
Please suggest something if you feel it is still not sufficient.
confluent-kafka-dotnet KIP 848 ListGroups API Running the example : Make sure to install the Librdkafka Any warnings via configure, make or make install are not subject to my changes. Formatting done via, Spawn the trivup cluster from Integration Testing done via : |
KIP 848 ListGroups API for the support of New Consumer Group Type 'Consumer'
No description provided.