You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "C0urante (via GitHub)" <gi...@apache.org> on 2023/06/29 16:03:15 UTC

[GitHub] [kafka] C0urante commented on a diff in pull request #13302: KAFKA-14759: Move Mock, Schema, and Verifiable connectors to new test-plugins module

C0urante commented on code in PR #13302:
URL: https://github.com/apache/kafka/pull/13302#discussion_r1246819377


##########
build.gradle:
##########
@@ -3048,6 +3049,39 @@ project(':connect:mirror-client') {
   }
 }
 
+project(':connect:test-plugins') {
+  archivesBaseName = "connect-test-plugins"
+
+  dependencies {
+    api project(':connect:api')
+
+    implementation project(':tools')
+    implementation libs.slf4jApi
+    implementation libs.jacksonDatabind
+
+    testImplementation libs.junitJupiter
+
+    testRuntimeOnly libs.slf4jlog4j

Review Comment:
   We don't have any tests for this module; is it premature to add these dependencies?



##########
build.gradle:
##########
@@ -3048,6 +3049,39 @@ project(':connect:mirror-client') {
   }
 }
 
+project(':connect:test-plugins') {
+  archivesBaseName = "connect-test-plugins"
+
+  dependencies {
+    api project(':connect:api')
+
+    implementation project(':tools')
+    implementation libs.slf4jApi
+    implementation libs.jacksonDatabind
+
+    testImplementation libs.junitJupiter
+
+    testRuntimeOnly libs.slf4jlog4j
+  }
+
+  tasks.create(name: "copyDependantLibs", type: Copy) {
+    from (configurations.testRuntimeClasspath) {
+      include('slf4j-log4j12*')
+      include('reload4j*jar')
+    }
+    from (configurations.runtimeClasspath) {
+      exclude('kafka-clients*')
+      exclude('connect-*')
+    }
+    into "$buildDir/dependant-libs"
+    duplicatesStrategy 'exclude'
+  }

Review Comment:
   Do we need this? It doesn't look like we use it anywhere (not in `bin/kafka-run-class.sh` or in our system tests' `connect.py`).



##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorPluginsResource.java:
##########
@@ -66,25 +58,14 @@ public class ConnectorPluginsResource implements ConnectResource {
     private final List<PluginInfo> connectorPlugins;
     private long requestTimeoutMs;
 
-    static final List<Class<? extends SinkConnector>> SINK_CONNECTOR_EXCLUDES = Arrays.asList(
-            VerifiableSinkConnector.class,
-            MockSinkConnector.class
-    );
-
-    static final List<Class<? extends SourceConnector>> SOURCE_CONNECTOR_EXCLUDES = Arrays.asList(
-            VerifiableSourceConnector.class,
-            MockSourceConnector.class,
-            SchemaSourceConnector.class
-    );
-
     public ConnectorPluginsResource(Herder herder) {
         this.herder = herder;
         this.connectorPlugins = new ArrayList<>();
         this.requestTimeoutMs = DEFAULT_REST_REQUEST_TIMEOUT_MS;
 
         // TODO: improve once plugins are allowed to be added/removed during runtime.
-        addConnectorPlugins(herder.plugins().sinkConnectors(), SINK_CONNECTOR_EXCLUDES);
-        addConnectorPlugins(herder.plugins().sourceConnectors(), SOURCE_CONNECTOR_EXCLUDES);
+        addConnectorPlugins(herder.plugins().sinkConnectors(), Collections.emptySet());
+        addConnectorPlugins(herder.plugins().sourceConnectors(), Collections.emptySet());

Review Comment:
   Can we remove the `excludes` parameter from the `addConnectorPlugins` method now?



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