Skip to content

Conversation

@ShivsundarR
Copy link
Contributor

@ShivsundarR ShivsundarR commented Sep 4, 2025

What
https://issues.apache.org/jira/browse/KAFKA-19623

Reviewers: Andrew Schofield aschofield@confluent.io, Jhen-Yung Hsu
jhenyunghsu@gmail.com, Jimmy Wang
48462172+JimmyWang6@users.noreply.github.com

@github-actions github-actions bot added triage PRs from the community tools labels Sep 4, 2025
@ShivsundarR ShivsundarR added ci-approved and removed triage PRs from the community labels Sep 4, 2025
Copy link
Contributor

@JimmyWang6 JimmyWang6 left a comment

Choose a reason for hiding this comment

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

@ShivsundarR Thanks for the patch. I think perhaps console_consumer.py and console_share_consumer.py might need to be changed as well.

Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. There are some more changes required too.

  • --property is deprecated and replaced by --formatter-property in the two consumer tools
  • There are a few docs references to the old names
  • The docker example references the old names

Copy link
Collaborator

@Yunyung Yunyung left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Partial review only. Please also update the e2e tests and ensure compatibility with older versions.

@github-actions github-actions bot added the docker Official Docker image label Sep 16, 2025
@AndrewJSchofield
Copy link
Member

@ShivsundarR Please fix the check style failure. I'll continue with reviewing the PR.

Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

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

You need to look at docker/test/docker_sanity_test.py.

Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

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

A couple of minor additional comments. Please can you run the docker_sanity_test.py also.

@ShivsundarR
Copy link
Contributor Author

ShivsundarR commented Sep 17, 2025

Thanks @AndrewJSchofield for the review. I ran the docker-sanity-test locally and it ran successfully. I have attached the results below.
results_docker_sanity_test.txt

Also there was a bug in docker_build_test.py that would not allow running this test using a local image. I had to modify it temporarily to accept --kafka-archive for tests and then it ran.
I have created an AK issue here - https://issues.apache.org/jira/browse/KAFKA-19718.

@ShivsundarR
Copy link
Contributor Author

I ran one of the tests in test_console_consumer.py with an older version (4.1) and latest version (4.2) and confirmed that the tests pass.
The older one uses the older parameters(consumer.config) and the tests running latest version uses the new parameters (command-config)
test_4_1.txt
test_4_2.txt

Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@AndrewJSchofield AndrewJSchofield merged commit 3bc50f9 into apache:trunk Sep 17, 2025
22 checks passed
Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@ShivsundarR Thanks for the patch. Just two small suggestions remain, which could be addressed in a follow-up

" print.value=true|false\n" +
" key.separator=<key.separator>\n" +
" line.separator=<line.separator>\n" +
" headers.separator=<line.separator>\n" +
Copy link
Member

Choose a reason for hiding this comment

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

typo: line.separator -> headers.separator

" print.value=true|false\n" +
" key.separator=<key.separator>\n" +
" line.separator=<line.separator>\n" +
" headers.separator=<line.separator>\n" +
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Copy link
Member

Choose a reason for hiding this comment

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

I'll fix this.

Copy link
Collaborator

@Yunyung Yunyung Sep 19, 2025

Choose a reason for hiding this comment

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

The new --formatter-property is not tested in the UT and still uses --property in the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @Yunyung, I had missed them, my bad.
I have raised a minor followup to add the unit tests here - #20560.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ditto.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I have raised follow-up fix here - #20560.

jim0987795064 pushed a commit to jim0987795064/kafka that referenced this pull request Sep 25, 2025
…onsumer. (apache#20479)

*What*
https://issues.apache.org/jira/browse/KAFKA-19623

- The PR implements KIP-1147

(https://cwiki.apache.org/confluence/display/KAFKA/KIP-1147%3A+Improve+consistency+of+command-line+arguments)
for the console tools i.e. `ConsoleProducer`, `ConsoleConsumer` and
`ConsoleShareConsumer`.

- Currently the previous names for the options are still usable but
there will be warning message stating those are deprecated and will be
removed in a future version.
- I have added unit tests and also manually verified using the console
tools that things are working as expected.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Jhen-Yung Hsu
 <jhenyunghsu@gmail.com>, Jimmy Wang
 <48462172+JimmyWang6@users.noreply.github.com>
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
…onsumer. (apache#20479)

*What*
https://issues.apache.org/jira/browse/KAFKA-19623

- The PR implements KIP-1147

(https://cwiki.apache.org/confluence/display/KAFKA/KIP-1147%3A+Improve+consistency+of+command-line+arguments)
for the console tools i.e. `ConsoleProducer`, `ConsoleConsumer` and
`ConsoleShareConsumer`.

- Currently the previous names for the options are still usable but
there will be warning message stating those are deprecated and will be
removed in a future version.
- I have added unit tests and also manually verified using the console
tools that things are working as expected.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Jhen-Yung Hsu
 <jhenyunghsu@gmail.com>, Jimmy Wang
 <48462172+JimmyWang6@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants