You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Randall Hauch (JIRA)" <ji...@apache.org> on 2017/06/19 21:21:00 UTC

[jira] [Assigned] (KAFKA-5472) Connector validate REST endpoint returning duplicate entries in "groups"

     [ https://issues.apache.org/jira/browse/KAFKA-5472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Randall Hauch reassigned KAFKA-5472:
------------------------------------

             Assignee: Randall Hauch
    Affects Version/s: 0.11.0.0
             Priority: Blocker  (was: Major)
          Component/s: KafkaConnect

The logic changed recently as [part of the classloader isolation changes|https://github.com/apache/kafka/commit/45f2261763eac5caaebf860daab32ef5337c9293#diff-fad18b064f6a9aa922ad13e6d7e60df3R252], and it looks to me like this introduced duplicate validation of the basic config definitions that contain properties in the "Common" and "Transform" groups. Prior to the classloading feature, the connector-independent (i.e., basic) configuration definitions were validated and then the connector-specific configurations were validated, and all groups added to the list of group names. However, with the classloading feature this logic was changed to validate the connector-independent (i.e., basic) configuration first, and then the connector-specific configurations are enriched with the basic configuration definitions and then all of these are validated. That leads to validating the basic configuration definitions twice.

There are several approaches to correct this:
* Simply remove duplicates from the list of all group names. This would still lead to the basic configurations being performed twice, but it is simple and low-risk.
* Remove [lines 245-252|https://github.com/apache/kafka/blob/45f2261763eac5caaebf860daab32ef5337c9293/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java#L245-L252] that validate just the basic config definitions, since the remaining code would enrich the connector-specific configuration definitions with the basic config defs and validate all of them. This approach is probably more correct, as long as we ensure that the basic config defs are validated first.
* Remove the enrichment process so that the second validation step only validates the connector-specific configuration properties. This is closest to the previous behavior.

> Connector validate REST endpoint returning duplicate entries in "groups"
> ------------------------------------------------------------------------
>
>                 Key: KAFKA-5472
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5472
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>    Affects Versions: 0.11.0.0
>            Reporter: Randall Hauch
>            Assignee: Randall Hauch
>            Priority: Blocker
>
> When calling the REST endpoint to validate a connector configuration, the response includes duplicate values for the {{groups}} field:
> {code:javascript}
> {
>   // ...
>   groups: ["Common", "Transforms", "Common", "Transforms"]
> }
> {code}
> This is a regression and may cause issues for any tooling that is using the Kafka Connect REST API.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)