kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-17662: config.providers configuration missing from the docs

Open m1a2st opened this issue 10 months ago • 12 comments

Jira: https://issues.apache.org/jira/browse/KAFKA-17662

add all properties doc contain the config.providers section.

m1a2st avatar Feb 17 '25 14:02 m1a2st

A label of 'needs-attention' was automatically added to this PR in order to raise the attention of the committers. Once this issue has been triaged, the triage label should be removed to prevent this automation from happening again.

github-actions[bot] avatar Feb 25 '25 03:02 github-actions[bot]

A label of 'needs-attention' was automatically added to this PR in order to raise the attention of the committers. Once this issue has been triaged, the triage label should be removed to prevent this automation from happening again.

github-actions[bot] avatar Mar 20 '25 03:03 github-actions[bot]

A label of 'needs-attention' was automatically added to this PR in order to raise the attention of the committers. Once this issue has been triaged, the triage label should be removed to prevent this automation from happening again.

github-actions[bot] avatar Mar 24 '25 03:03 github-actions[bot]

Hi @mjsax, thanks for your review, I believe this change is simply updating the documentation for something we've been missing. I wrote a simple demo using a Kafka consumer with config.providers, and it still works as expected. Given that, I don't think this change requires a KIP, WDTY? demo code: https://github.com/m1a2st/Kafka-practice/blob/test-config-provider/kafka-basic/src/main/java/io/demos/kafka/configprovider/ConfigProviderConsumer.java https://github.com/m1a2st/Kafka-practice/blob/test-config-provider/kafka-basic/src/main/java/io/demos/kafka/configprovider/MapConfigProvider.java

m1a2st avatar Apr 05 '25 02:04 m1a2st

I don't know exactly how config.provider works from top of my head. Can you give a TL;DR? Would like to understand to what extend it applies to KS and if it would work as expected w/o any other changes?

Config Providers is a mechanism for externalizing configuration values, particularly sensitive information like credentials, from configuration files.

ref: https://kafka.apache.org/documentation/#config_providers

m1a2st avatar Apr 05 '25 02:04 m1a2st

@mjsax This configuration was effectively added to all subclasses of AbstractConfig in KIP-421 https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=100829515 back in 2019

Now looking at this again, I wonder if documenting it this way helps or hurts. Yes the configuration is always present, but No the configuration may not always be relevant to each of these components and documenting it may be noisy.

gharris1727 avatar Apr 06 '25 19:04 gharris1727

Thanks for the background info.

Now looking at this again, I wonder if documenting it this way helps or hurts. Yes the configuration is always present, but No the configuration may not always be relevant to each of these components and documenting it may be noisy.

Not sure if I can follow? Yes, the ticket is about documenting that this config exists, and adding it to the corresponding config classes will achieve this. But I don't see why it could hurt?

but No the configuration may not always be relevant to each of these components and documenting it may be noisy.

Why do you mean by "may not always be relevant"?

However, even if it does not hurt, I am wondering if it's important enough to add? It seems there is a few CommonConfigs that are not in all "config classes" (ie, ConsumerConfigs, etc) -- So I would rather question if the Jira ticket to document this better is actually required to begin with? @mimaison What was the motivation for the ticket?

mjsax avatar Apr 08 '25 01:04 mjsax

The fact that @mjsax was not familiar with this feature kind of proves my point that it's missing documentation. I also get this impression working with users that either don't know about ConfigProviders or don't know how to use them.

It's a configuration you can set on all components, so I don't understand why it's not listed in our docs like the other configurations.

mimaison avatar Apr 08 '25 09:04 mimaison

Thanks @mimaison -- that's fair. I am totally ok to add it.

mjsax avatar Apr 11 '25 21:04 mjsax

Thanks for the PR.

I generated the docs and theconfig.providers is now listed for producer, consumer, admin, connect, mirrormaker and streams but it's still missing from the broker configs.

mimaison avatar May 16 '25 10:05 mimaison

Hello @mimaison, I update the serverConfig, and test in my local CleanShot 2025-05-16 at 21 42 48@2x

m1a2st avatar May 16 '25 13:05 m1a2st

@mjsax @gharris1727 Do you have any other comments?

mimaison avatar Jun 12 '25 10:06 mimaison