You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/09/21 16:06:15 UTC

[GitHub] [kafka] C0urante commented on pull request #11333: KAFKA-13306: Null connector config value passes validation, but fails creation

C0urante commented on pull request #11333:
URL: https://github.com/apache/kafka/pull/11333#issuecomment-924133203


   Thanks @lhunyady. I wonder if instead of throwing an exception we can add an error message to the offending config properties? This would allow other configuration errors to be surfaced immediately in calls to `PUT /connector-plugins/{connectorClass}/config/validate` instead of requiring users to issue a follow-up request, and would return a more standard request type than the 500 that I believe would be returned in response to an uncaught exception.
   
   If this approach is desirable, we could implement it with an additional step in [`AbstractHerder::validateConnectorConfig`](https://github.com/apache/kafka/blob/f650a14d56c0cc33263c29d8d242760406943c5b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java#L418) that uses [`ConfigValue::addErrorMessage`](https://kafka.apache.org/28/javadoc/org/apache/kafka/common/config/ConfigValue.html#addErrorMessage(java.lang.String)) to report to the user that literal `null` values are not permitted in connector configurations, adding a new `ConfigValue` for the offending property if one isn't already defined by the connector, the Connect framework, etc.
   
   Thoughts?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org