You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "fvaleri (via GitHub)" <gi...@apache.org> on 2023/09/14 15:57:17 UTC
[GitHub] [kafka] fvaleri commented on pull request #13201: KAFKA-14596: Move TopicCommand to tools
fvaleri commented on PR #13201:
URL: https://github.com/apache/kafka/pull/13201#issuecomment-1719725886
> > Hi @OmniaGM, thanks. I left some comments.
> > Additionally, this error message is different from previous implementation:
> > ```shell
> > ### OLD
> > $ bin/kafka-topics.sh --bootstrap-server :9092 --describe --topic my-topic-foo --delete-config sdsad
> > Option "[delete-config]" can't be used with option "[describe]"
> >
> > ### NEW
> > $ bin/kafka-topics.sh --bootstrap-server :9092 --describe --topic my-topic-foo --delete-config sdsad
> > Option "[delete-config]" can't be used with option "[bootstrap-server]"
> > ```
>
> Good catch @fvaleri , I missed that `immutable.Set` which is used to define invalid options in old scala code does preserve the order of insertion so when we check `bootstrap` option wasn't the first one the list in scala to compare but instead it's `describe`. I updated the code to use `LinkedHashSet` instead of `Set` which should solve the problem now.
>
> I also think the original [scala code](https://github.com/apache/kafka/blob/ac39342d47062c1a9aec9b744b40ad7fd2de27b2/core/src/main/scala/kafka/admin/TopicCommand.scala#L627C1-L627C146) was wrong and shouldn't have bootsrap option to the args to check as this means `deleteConfigOpt` not allowed with bootstrap options which isn't accurate. Not sure if we should remove it or not WDYT?
This is correct, although the error message could be improved (see `alter` option description). The `delete-config` option was used along with the deprecated `zookeeper` option, which was removed in KAFKA-12596. I think that PR missed to remove `delete-config`. Feel free to raise a separate issue for that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org