Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-17650: validate ReplaceField config #17247

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

TaiJuWu
Copy link
Contributor

@TaiJuWu TaiJuWu commented Sep 22, 2024

jira: https://issues.apache.org/jira/browse/KAFKA-17650
There is no validation of ReplaceField, we should add it.

Committer Checklist (excluded from commit message)

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

Copy link
Contributor

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

@TaiJuWu, Thanks for your PR, I left some comments, PTAL

Copy link
Contributor

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

LGTM

@chia7712
Copy link
Contributor

@TaiJuWu Could you please file a jira as it is a kind of bug

@TaiJuWu TaiJuWu changed the title MINOR: validate ReplaceField config KAFKA-17650: validate ReplaceField config Sep 29, 2024
@TaiJuWu
Copy link
Contributor Author

TaiJuWu commented Sep 29, 2024

@TaiJuWu Could you please file a jira as it is a kind of bug

Done. Updated in title and post, thanks!

@chia7712
Copy link
Contributor

@TaiJuWu why we need this changes? the other fields have no such checks.

@TaiJuWu
Copy link
Contributor Author

TaiJuWu commented Sep 30, 2024

@TaiJuWu why we need this changes? the other fields have no such checks.

I noticed the check in the client-side module and believe it could also be applied to the connect module.
Personally, I would prefer that all user-provided configurations are explicitly defined.
However, if this check is unnecessary, I’m happy to close the PR.

@chia7712
Copy link
Contributor

Personally, I would prefer that all user-provided configurations are explicitly defined.

that is a kind of behavior change. We need KIP if it is necessary improvement.

@@ -72,6 +73,10 @@ interface ConfigName {
.define(ConfigName.REPLACE_NULL_WITH_DEFAULT_CONFIG, ConfigDef.Type.BOOLEAN, true, ConfigDef.Importance.MEDIUM,
"Whether to replace fields that have a default value and that are null to the default value. When set to true, the default value is used, otherwise null is used.");

private static Set<String> configNames() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I note that ConfigName.RENAME actually has the value "renames" so it probably should be ConfigName.RENAMES. This probably ought to be resolved.

Copy link
Contributor

Choose a reason for hiding this comment

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

@TaiJuWu Maybe you can file a minor PR to fix the naming. this PR needs more discussion due to behavior change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@TaiJuWu Maybe you can file a minor PR to fix the naming. this PR needs more discussion due to behavior change.

Will do, thanks for helping check.

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

Successfully merging this pull request may close these issues.

4 participants