Skip to content

KAFKA-20389: Add 'internal' flag to ConfigKeyInfo#21976

Open
nileshkumar3 wants to merge 1 commit intoapache:trunkfrom
nileshkumar3:KAFKA-20389-config-key-info-internal
Open

KAFKA-20389: Add 'internal' flag to ConfigKeyInfo#21976
nileshkumar3 wants to merge 1 commit intoapache:trunkfrom
nileshkumar3:KAFKA-20389-config-key-info-internal

Conversation

@nileshkumar3
Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions bot added triage PRs from the community connect small Small PRs labels Apr 7, 2026
@JsonProperty("dependents") List<String> dependents
@JsonProperty("dependents") List<String> dependents,
@JsonProperty("internal") boolean internal
) {
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.

@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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

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.

Thanks @mimaison, this is helpful. request your review on this PR.

@github-actions github-actions bot removed the triage PRs from the community label Apr 8, 2026
@mimaison
Copy link
Copy Markdown
Member

mimaison commented Apr 8, 2026

I'm not sure this change makes sense. See my comment in https://issues.apache.org/jira/browse/KAFKA-20389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants