KAFKA-20389: Add 'internal' flag to ConfigKeyInfo#21976
Open
nileshkumar3 wants to merge 1 commit intoapache:trunkfrom
Open
KAFKA-20389: Add 'internal' flag to ConfigKeyInfo#21976nileshkumar3 wants to merge 1 commit intoapache:trunkfrom
nileshkumar3 wants to merge 1 commit intoapache:trunkfrom
Conversation
nileshkumar3
commented
Apr 8, 2026
| @JsonProperty("dependents") List<String> dependents | ||
| @JsonProperty("dependents") List<String> dependents, | ||
| @JsonProperty("internal") boolean internal | ||
| ) { |
Contributor
Author
There was a problem hiding this comment.
@mimaison Since ConfigKeyInfo is a public API class and adding a new record component changes its constructor signature, does this change require a KIP? The REST API change is additive (new internal field in JSON), but Java clients constructing ConfigKeyInfo directly would break.
Member
There was a problem hiding this comment.
ConfigKeyInfo is not part of the public API. You can see all the public API classes in https://kafka.apache.org/42/javadoc/index.html
Contributor
Author
There was a problem hiding this comment.
Thanks @mimaison, this is helpful. request your review on this PR.
Member
|
I'm not sure this change makes sense. See my comment in https://issues.apache.org/jira/browse/KAFKA-20389 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
The Connect REST endpoint GET /connector-plugins/{pluginName}/config returns a list of ConfigKeyInfo objects. Currently these objects do not expose whether a config key is marked as internal in the underlying ConfigDef. Internal configs are not intended for general use, but without this flag, API consumers have no way to programmatically distinguish them from user-facing configs. Since this endpoint is part of the public API, changing its filtering behavior would be a breaking change. Instead, this PR exposes the information and lets clients decide.
Changes
ConfigKeyInfo: Added a new boolean internal record component, serialized as "internal" in JSON.
AbstractHerder.convertConfigKey: Populates the new field from ConfigKey.internalConfig.
ConnectorPluginsResourceTest: Updated all ConfigKeyInfo constructor call sites. Added a defineInternal config to the test connector and assertions verifying internal is true for internal keys and false for regular keys.
Compatibility
The new field is additive. JSON clients that ignore unknown fields are unaffected. No existing fields or behaviors are modified.
Testing
Existing ConnectorPluginsResourceTest updated and passing.
New test coverage explicitly asserts the internal flag for both internal and non-internal config keys.