MINOR: Do not print an empty line when no topics exist#13762
MINOR: Do not print an empty line when no topics exist#13762KarboniteKream wants to merge 1 commit intoapache:trunkfrom
Conversation
divijvaidya
left a comment
There was a problem hiding this comment.
Thank you for your first contribution to the project!
While the change looks good, I am afraid that changing the output format may break scripts that may be relying on the "bug" / presence of a new line.
I would be ok with this breaking change since we don't promise output compatibility of shell commands.
Let's hear what the others in the community have to say about this.
|
Thanks for the PR @KarboniteKream . I agree with Divij's statement above about existing client might break. Also, there is an ongoing effort to modularize the core monolith module which also covers some of the tools related migration. As part of that, TopicCommand is also covered and there's an open PR for the same #13201 Since your PR is against master, you might want to align your PR with that PR? WDYT? |
|
Sure, I understand the concerns.
Do you mean waiting for that PR to get merged, then rebase my changes? Or add my change to that PR? |
You could wait for the PR to get merged if that's ok to you. It's your call TBH :) |
|
Sure, it's no problem for me to wait. I just wanted to confirm what you had in mind. |
|
This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please ask a committer for review. If the PR has merge conflicts, please update it with the latest from trunk (or appropriate release branch) If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed. |
92868ca to
44839aa
Compare
There was a problem hiding this comment.
This was logging as Created topic Optional[foobar].
|
@divijvaidya @vamossagar12 I have rebased my PR now that #13201 has been merged. |
44839aa to
11ea818
Compare
|
This PR is being marked as stale since it has not had any activity in 90 days. If you If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact). If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed. |
|
This PR has been closed since it has not had any activity in 120 days. If you feel like this |
When running
kafka-topics.sh --list, the command will print an empty line if no topics exist. This can cause some confusion when running withwc -l, so it's better to make sure the number of lines is zero in such a case.This was tested against a cluster with 0 and 1+ topics to make sure the output is correct.
Committer Checklist (excluded from commit message)