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

fix: fix parsing issue with LIST property overrides #3601

Merged

Conversation

big-andy-coates
Copy link
Contributor

Description

Any config of type LIST would not be coerced properly by KsqlRequest.

e.g. setting set 'consumer.interceptor.classes'='io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor';

would see the value coerced to a LIST containing a single value of '[io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor]', rather than io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor.

This commit resolves this issue. No other ConfigDef.Type should have a similar issue, as they are all single value.

Testing done

mvn test

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

Any config of type LIST would not be coerced properly by `KsqlRequest`.

e.g. setting `set 'consumer.interceptor.classes'='io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor';`

would see the value coerced to a LIST containing a single value of '[io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor]', rather than `io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor`.

This commit resolves this issue. No other `ConfigDef.Type` should have a similar issue, as they are all single value.
@big-andy-coates big-andy-coates requested a review from a team as a code owner October 16, 2019 17:29
Copy link
Contributor

@purplefox purplefox left a comment

Choose a reason for hiding this comment

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

LGTM, just one comment

@@ -124,10 +125,21 @@ public String toString() {

private static Object coerceType(final String key, final Object value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

MIght be nice to rename this coerceProperty or similar? It took me a while to figure out what it's doing, which would have been more obvious with a better name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm ok with the name as-is, plus not added in this PR.

@big-andy-coates big-andy-coates merged commit 6459fa1 into confluentinc:master Oct 17, 2019
@big-andy-coates big-andy-coates deleted the list_property_overrides branch October 17, 2019 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants