Skip to content

Conversation

majialoong
Copy link
Contributor

KAFKA-19112 defines the plugin.path config as non-empty. This PR add validation for plugin.path related config in the connect-plugin-path.sh tool to satisfy the same non-empty semantics, addressing the issue mentioned here.

@github-actions github-actions bot added triage PRs from the community tools small Small PRs labels Oct 4, 2025
Copy link
Collaborator

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

Thanks @majialoong for this patch, left some comments.

}
String pluginPath = properties.getProperty(WorkerConfig.PLUGIN_PATH_CONFIG);
if (pluginPath != null) {
validatePluginPath(pluginPath, WorkerConfig.PLUGIN_PATH_CONFIG);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should throw a ConfigException when validating WorkerConfig.PLUGIN_PATH_CONFIG at this stage. This would preserve the same behavior as when WorkerConfig.PLUGIN_PATH_CONFIG is set to an empty value in the config.

""
);
assertNotEquals(0, res.returnCode);
assertTrue("'--plugin-path' must not be empty.\n".equals(res.err));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use assertEquals to validate the error message.

"location-a,,location-b"
);
assertNotEquals(0, res.returnCode);
assertTrue("'--plugin-path' values must not be empty.\n".equals(res.err));
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

configPath.toString()
);
assertNotEquals(0, res.returnCode);
assertTrue("'plugin.path' must not be empty.\n".equals(res.err));
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

configPath.toString()
);
assertNotEquals(0, res.returnCode);
assertTrue("'plugin.path' values must not be empty.\n".equals(res.err));
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

@github-actions github-actions bot removed the triage PRs from the community label Oct 5, 2025
@majialoong
Copy link
Contributor Author

Thanks @m1a2st review, I have made the changes.

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.

3 participants