mimaison commented on code in PR #21330:
URL: https://github.com/apache/kafka/pull/21330#discussion_r2884349697


##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/PluginsTest.java:
##########
@@ -727,6 +727,11 @@ public String version() {
     public static class TestHeaderConverter implements HeaderConverter {
         public Map<String, ?> configs;
 
+        @Override
+        public String version() {
+            return "test";
+        }
+

Review Comment:
   Do we need this?



##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/ConnectorConfigTest.java:
##########
@@ -410,7 +410,7 @@ public AbstractTestPredicate() { }
 
     }
 
-    public abstract static class AbstractTransformation<R extends 
ConnectRecord<R>> implements Transformation<R>, Versioned  {
+    public abstract static class AbstractTransformation<R extends 
ConnectRecord<R>> implements Transformation<R>  {

Review Comment:
   We can also remove `implements Version` in `AbstractTestPredicate` just above



##########
connect/api/src/main/java/org/apache/kafka/connect/components/ConnectPlugin.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.connect.components;
+
+import org.apache.kafka.common.config.ConfigDef;
+
+/**
+ * Interface for components that provide version and configuration 
specifications.
+ * This interface establishes a common contract for all Kafka Connect 
components
+ * that define a version and expose configurable properties, enabling uniform 
discovery and introspection
+ * of component configurations.
+ *
+ * <p>Components implementing this interface declare their version and 
configuration requirements
+ * through a {@link ConfigDef} object, which describes the configuration 
properties
+ * including their names, types, default values, validators, and documentation.
+ *
+ */
+public interface ConnectPlugin extends Versioned {
+
+    /**
+     * Returns the configuration specification for this component.
+     *
+     * <p>The returned {@link ConfigDef} object describes all configuration 
properties
+     * that this component accepts, including their types, default values, 
validators,
+     * importance levels, and documentation strings.
+     *
+     * @return the configuration definition for this component; never null
+     */
+    ConfigDef config();
+} 

Review Comment:
   Nit: Add a new line



##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/ConnectorConfigTest.java:
##########
@@ -410,7 +410,7 @@ public AbstractTestPredicate() { }
 
     }
 
-    public abstract static class AbstractTransformation<R extends 
ConnectRecord<R>> implements Transformation<R>, Versioned  {
+    public abstract static class AbstractTransformation<R extends 
ConnectRecord<R>> implements Transformation<R>  {

Review Comment:
   and `SimpleTransformation`



##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/ConnectorConfigTest.java:
##########
@@ -410,7 +410,7 @@ public AbstractTestPredicate() { }
 
     }
 
-    public abstract static class AbstractTransformation<R extends 
ConnectRecord<R>> implements Transformation<R>, Versioned  {
+    public abstract static class AbstractTransformation<R extends 
ConnectRecord<R>> implements Transformation<R>  {

Review Comment:
   and `AbstractKeyValueTransformation.Key` too



##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/ConnectorConfigTest.java:
##########
@@ -410,7 +410,7 @@ public AbstractTestPredicate() { }
 
     }
 
-    public abstract static class AbstractTransformation<R extends 
ConnectRecord<R>> implements Transformation<R>, Versioned  {
+    public abstract static class AbstractTransformation<R extends 
ConnectRecord<R>> implements Transformation<R>  {

Review Comment:
   We also have `HasDuplicateConfigTransformation` which still implements 
Versioned a bit below



##########
connect/api/src/main/java/org/apache/kafka/connect/components/package-info.java:
##########
@@ -15,6 +15,6 @@
  * limitations under the License.
  */
 /**
- * Provides common interfaces used to describe pluggable components.
+ * Provides common interfaces used to describe pluggable and configurable 
components.

Review Comment:
   Should we mention versioned as well?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to