Skip to content

MINOR: Adds entity-specific flags to ConfigCommand per KIP-543.#7667

Merged
cmccabe merged 2 commits into
apache:trunkfrom
bdbyrne:KIP-543-1
Dec 4, 2019
Merged

MINOR: Adds entity-specific flags to ConfigCommand per KIP-543.#7667
cmccabe merged 2 commits into
apache:trunkfrom
bdbyrne:KIP-543-1

Conversation

@bdbyrne

@bdbyrne bdbyrne commented Nov 8, 2019

Copy link
Copy Markdown
Contributor

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

else
None
val name = entityNames.headOption match {
case Some("") => Some(ConfigEntityName.Default)

@cmccabe cmccabe Nov 22, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I know this is an existing problem in the code, but I really think we should avoid overloading the meaning of the empty string to mean "the default." It's not very clear, and furthermore, we made the unfortunate decision to allow empty names in some cases. For example empty consumer group names are valid. :( Let's use a List[Option[String]] here to make it clear.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed, this would be much cleaner. The only concern I have is that this may break compatibility, e.g. --entity-type users --entity-name "" (double quotes) would resolve to the default user today, whereas with this change it'd resolve to the empty user name. If we continue to pass it along, then the formed ZK config path may be invalid/unexpected.

I would consider leaving it as-is for ConfigCommand, and then the new API can be more intelligent about this sort of thing. Thoughts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ping - any thoughts/comments? BTW, you will need to integrate the PR since I don't have permissions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess we can kick the can down the road with regard to empty string handling. We will have to tackle it when designing the client side quotas API, though (probably by forbidding empty strings for now...)

@cmccabe

cmccabe commented Nov 22, 2019

Copy link
Copy Markdown
Contributor

Thanks, @bdbyrne. Looks good.

@cmccabe

cmccabe commented Dec 4, 2019

Copy link
Copy Markdown
Contributor

LGTM

@cmccabe cmccabe merged commit 95581f3 into apache:trunk Dec 4, 2019
@bdbyrne bdbyrne deleted the KIP-543-1 branch December 4, 2019 18:22
gitlw pushed a commit to linkedin/kafka that referenced this pull request Sep 9, 2021
…gCommand per KIP-543. (apache#7667)

Reviewers: Colin P. McCabe <cmccabe@apache.org>
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