You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ma...@apache.org on 2022/05/03 09:01:06 UTC

[flink-connector-elasticsearch] branch main updated (8c12be7 -> f966128)

This is an automated email from the ASF dual-hosted git repository.

martijnvisser pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-elasticsearch.git


    from 8c12be7  [hotfix] Changing comment structure for go.mod because running `hugo mod get -u github.com/apache/flink-connector-elasticsearch/docs` results in:
     new efa3b15  [FLINK-27061][maven] fix relative path bug.
     new 9924bb6  [FLINK-27061][maven] change the dependency to 1.16-SNAPSHOT.
     new 132df0f  [FLINK-27061][pom] add shaded libs into dependency management
     new b2a13da  [FLINK-27061][ES7] ArchUnit test for production code
     new 85e02e0  [FLINK-27061][ES6] ArchUnit test for production code
     new f966128  [FLINK-27061][ES-base] ArchUnit test for production code

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...a8c56d => 06cb39ec-97e2-4e4e-8aa7-cd92504b759c} |  0
 ...a8c56d => 09532d6b-7cb1-4621-90af-755558763875} |  0
 ...a8c56d => 143fca50-a3b9-4a4b-983e-40dd2c424f62} |  0
 ...a8c56d => 4539e81b-9c72-4fd7-b7b3-ffc2e546b968} |  0
 ...a8c56d => aca99410-c331-4bc2-a45b-1363eb8dd20c} |  0
 .../archunit-violations/stored.rules               |  7 ++-
 flink-connector-elasticsearch-base/pom.xml         |  1 -
 .../ProductionCodeArchitectureTest.java            | 23 ++++----
 .../07e22212-0fdc-435a-9a8b-aca438213316           |  0
 .../3010cd85-0143-4cff-9095-1f24a1979f7f           |  0
 .../795761fe-68cf-40d9-8ed8-bc6f47cb2292           |  0
 .../82e2a33f-9c4b-49ed-95d5-2319a9ae5e1f           |  0
 .../a4b5cf92-8e7d-43af-9d55-c693e352a3bc           |  0
 .../archunit-violations/stored.rules               |  7 ++-
 flink-connector-elasticsearch6/pom.xml             |  8 ---
 .../ProductionCodeArchitectureTest.java            | 14 +++--
 .../4ffc80d0-834c-4711-a2a4-f24948f0fd0f           |  0
 .../893771a6-9a82-4eb5-9719-fda012294928           |  0
 .../af589e22-ad7e-411d-b007-e09c72c65ef6           | 12 +++++
 .../f3cbf8e9-b63f-492e-8870-cf4b0970188a           |  0
 .../fc6d0585-2b27-4173-9b55-f7b3e54c6f0b           |  0
 .../archunit-violations/stored.rules               |  7 ++-
 flink-connector-elasticsearch7/pom.xml             |  5 ++
 .../ProductionCodeArchitectureTest.java            | 14 +++--
 pom.xml                                            | 61 +++++++++++++++++++++-
 25 files changed, 117 insertions(+), 42 deletions(-)
 copy flink-connector-elasticsearch-base/archunit-violations/{de342dd1-c974-42c9-8f64-ef182ba8c56d => 06cb39ec-97e2-4e4e-8aa7-cd92504b759c} (100%)
 copy flink-connector-elasticsearch-base/archunit-violations/{de342dd1-c974-42c9-8f64-ef182ba8c56d => 09532d6b-7cb1-4621-90af-755558763875} (100%)
 copy flink-connector-elasticsearch-base/archunit-violations/{de342dd1-c974-42c9-8f64-ef182ba8c56d => 143fca50-a3b9-4a4b-983e-40dd2c424f62} (100%)
 copy flink-connector-elasticsearch-base/archunit-violations/{de342dd1-c974-42c9-8f64-ef182ba8c56d => 4539e81b-9c72-4fd7-b7b3-ffc2e546b968} (100%)
 copy flink-connector-elasticsearch-base/archunit-violations/{de342dd1-c974-42c9-8f64-ef182ba8c56d => aca99410-c331-4bc2-a45b-1363eb8dd20c} (100%)
 copy flink-connector-elasticsearch7/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java => flink-connector-elasticsearch-base/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java (67%)
 copy flink-connector-elasticsearch-base/archunit-violations/de342dd1-c974-42c9-8f64-ef182ba8c56d => flink-connector-elasticsearch6/archunit-violations/07e22212-0fdc-435a-9a8b-aca438213316 (100%)
 copy flink-connector-elasticsearch-base/archunit-violations/de342dd1-c974-42c9-8f64-ef182ba8c56d => flink-connector-elasticsearch6/archunit-violations/3010cd85-0143-4cff-9095-1f24a1979f7f (100%)
 copy flink-connector-elasticsearch-base/archunit-violations/de342dd1-c974-42c9-8f64-ef182ba8c56d => flink-connector-elasticsearch6/archunit-violations/795761fe-68cf-40d9-8ed8-bc6f47cb2292 (100%)
 copy flink-connector-elasticsearch-base/archunit-violations/de342dd1-c974-42c9-8f64-ef182ba8c56d => flink-connector-elasticsearch6/archunit-violations/82e2a33f-9c4b-49ed-95d5-2319a9ae5e1f (100%)
 copy flink-connector-elasticsearch-base/archunit-violations/de342dd1-c974-42c9-8f64-ef182ba8c56d => flink-connector-elasticsearch6/archunit-violations/a4b5cf92-8e7d-43af-9d55-c693e352a3bc (100%)
 copy flink-connector-elasticsearch-base/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java => flink-connector-elasticsearch6/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java (77%)
 copy flink-connector-elasticsearch-base/archunit-violations/de342dd1-c974-42c9-8f64-ef182ba8c56d => flink-connector-elasticsearch7/archunit-violations/4ffc80d0-834c-4711-a2a4-f24948f0fd0f (100%)
 copy flink-connector-elasticsearch-base/archunit-violations/de342dd1-c974-42c9-8f64-ef182ba8c56d => flink-connector-elasticsearch7/archunit-violations/893771a6-9a82-4eb5-9719-fda012294928 (100%)
 create mode 100644 flink-connector-elasticsearch7/archunit-violations/af589e22-ad7e-411d-b007-e09c72c65ef6
 copy flink-connector-elasticsearch-base/archunit-violations/de342dd1-c974-42c9-8f64-ef182ba8c56d => flink-connector-elasticsearch7/archunit-violations/f3cbf8e9-b63f-492e-8870-cf4b0970188a (100%)
 copy flink-connector-elasticsearch-base/archunit-violations/de342dd1-c974-42c9-8f64-ef182ba8c56d => flink-connector-elasticsearch7/archunit-violations/fc6d0585-2b27-4173-9b55-f7b3e54c6f0b (100%)
 copy flink-connector-elasticsearch-base/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java => flink-connector-elasticsearch7/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java (77%)


[flink-connector-elasticsearch] 02/06: [FLINK-27061][maven] change the dependency to 1.16-SNAPSHOT.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martijnvisser pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-elasticsearch.git

commit 9924bb638a523ad8c3bb04c745ee4087843b7085
Author: Jing Ge <ge...@gmail.com>
AuthorDate: Wed Apr 6 17:14:32 2022 +0200

    [FLINK-27061][maven] change the dependency to 1.16-SNAPSHOT.
---
 pom.xml | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 01587ee..9e38ebc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,7 +70,7 @@ under the License.
 		<flink.forkCountTestPackage>${flink.forkCount}</flink.forkCountTestPackage>
 		<flink.reuseForks>true</flink.reuseForks>
 
-		<flink.version>1.15-SNAPSHOT</flink.version>
+		<flink.version>1.16-SNAPSHOT</flink.version>
 		<flink.shaded.version>15.0</flink.shaded.version>
 		<flink.shaded.jackson.version>2.12.4</flink.shaded.jackson.version>
 		<target.java.version>1.8</target.java.version>
@@ -241,6 +241,19 @@ under the License.
 			<artifactId>httpcore-nio</artifactId>
 		</dependency>
 
+		<!-- ArchUit test dependencies -->
+
+		<dependency>
+			<groupId>org.apache.flink</groupId>
+			<artifactId>flink-architecture-tests-test</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.flink</groupId>
+			<artifactId>flink-architecture-tests-production</artifactId>
+			<scope>test</scope>
+		</dependency>
+
 	</dependencies>
 
 	<!-- this section defines the module versions that are used if nothing else is specified. -->
@@ -275,6 +288,7 @@ under the License.
 				<scope>test</scope>
 			</dependency>
 
+			<!-- Flink ArchUnit -->
 
 			<dependency>
 				<groupId>org.apache.flink</groupId>
@@ -290,6 +304,13 @@ under the License.
 				<scope>test</scope>
 			</dependency>
 
+			<dependency>
+				<groupId>org.apache.flink</groupId>
+				<artifactId>flink-architecture-tests-production</artifactId>
+				<version>${flink.version}</version>
+				<scope>test</scope>
+			</dependency>
+
 			<!-- This manages the 'javax.annotation' annotations (JSR305) -->
 			<dependency>
 				<groupId>com.google.code.findbugs</groupId>


[flink-connector-elasticsearch] 03/06: [FLINK-27061][pom] add shaded libs into dependency management

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martijnvisser pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-elasticsearch.git

commit 132df0f4a75efff79da3ae28d6c5c7adde168358
Author: Jing Ge <ge...@gmail.com>
AuthorDate: Tue May 3 10:28:44 2022 +0200

    [FLINK-27061][pom] add shaded libs into dependency management
---
 pom.xml | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/pom.xml b/pom.xml
index 9e38ebc..b310ef7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -262,6 +262,44 @@ under the License.
 
 		<dependencies>
 
+			<!-- flink shaded dependencies -->
+			<dependency>
+				<groupId>org.apache.flink</groupId>
+				<artifactId>flink-shaded-asm-9</artifactId>
+				<version>9.2-${flink.shaded.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.flink</groupId>
+				<artifactId>flink-shaded-guava</artifactId>
+				<version>30.1.1-jre-${flink.shaded.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.flink</groupId>
+				<artifactId>flink-shaded-jackson</artifactId>
+				<version>${flink.shaded.jackson.version}-${flink.shaded.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.flink</groupId>
+				<artifactId>flink-shaded-jackson-module-jsonSchema</artifactId>
+				<version>${flink.shaded.jackson.version}-${flink.shaded.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.flink</groupId>
+				<artifactId>flink-shaded-netty</artifactId>
+				<version>4.1.70.Final-${flink.shaded.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.flink</groupId>
+				<artifactId>flink-shaded-netty-tcnative-dynamic</artifactId>
+				<version>2.0.44.Final-${flink.shaded.version}</version>
+				<scope>test</scope>
+			</dependency>
+
 			<!-- flink dependencies -->
 
 			<dependency>


[flink-connector-elasticsearch] 06/06: [FLINK-27061][ES-base] ArchUnit test for production code

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martijnvisser pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-elasticsearch.git

commit f966128604c565b68bd16de9b74d008b7061848d
Author: Jing Ge <ge...@gmail.com>
AuthorDate: Wed Apr 6 17:19:25 2022 +0200

    [FLINK-27061][ES-base] ArchUnit test for production code
---
 .../06cb39ec-97e2-4e4e-8aa7-cd92504b759c           |  0
 .../09532d6b-7cb1-4621-90af-755558763875           |  0
 .../143fca50-a3b9-4a4b-983e-40dd2c424f62           |  0
 .../4539e81b-9c72-4fd7-b7b3-ffc2e546b968           |  0
 .../aca99410-c331-4bc2-a45b-1363eb8dd20c           |  0
 .../archunit-violations/stored.rules               |  7 ++-
 .../ProductionCodeArchitectureTest.java            | 54 ++++++++++++++++++++++
 7 files changed, 60 insertions(+), 1 deletion(-)

diff --git a/flink-connector-elasticsearch-base/archunit-violations/06cb39ec-97e2-4e4e-8aa7-cd92504b759c b/flink-connector-elasticsearch-base/archunit-violations/06cb39ec-97e2-4e4e-8aa7-cd92504b759c
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch-base/archunit-violations/09532d6b-7cb1-4621-90af-755558763875 b/flink-connector-elasticsearch-base/archunit-violations/09532d6b-7cb1-4621-90af-755558763875
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch-base/archunit-violations/143fca50-a3b9-4a4b-983e-40dd2c424f62 b/flink-connector-elasticsearch-base/archunit-violations/143fca50-a3b9-4a4b-983e-40dd2c424f62
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch-base/archunit-violations/4539e81b-9c72-4fd7-b7b3-ffc2e546b968 b/flink-connector-elasticsearch-base/archunit-violations/4539e81b-9c72-4fd7-b7b3-ffc2e546b968
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch-base/archunit-violations/aca99410-c331-4bc2-a45b-1363eb8dd20c b/flink-connector-elasticsearch-base/archunit-violations/aca99410-c331-4bc2-a45b-1363eb8dd20c
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch-base/archunit-violations/stored.rules b/flink-connector-elasticsearch-base/archunit-violations/stored.rules
index 76f9416..7560973 100644
--- a/flink-connector-elasticsearch-base/archunit-violations/stored.rules
+++ b/flink-connector-elasticsearch-base/archunit-violations/stored.rules
@@ -1,4 +1,9 @@
 #
-#Tue Feb 22 12:16:59 CET 2022
+#Wed Apr 06 17:09:41 CEST 2022
+Options\ for\ connectors\ and\ formats\ should\ reside\ in\ a\ consistent\ package\ and\ be\ public\ API.=aca99410-c331-4bc2-a45b-1363eb8dd20c
+Production\ code\ must\ not\ call\ methods\ annotated\ with\ @VisibleForTesting=4539e81b-9c72-4fd7-b7b3-ffc2e546b968
 Tests\ inheriting\ from\ AbstractTestBase\ should\ have\ name\ ending\ with\ ITCase=de342dd1-c974-42c9-8f64-ef182ba8c56d
+Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @PublicEvolving\ must\ be\ annotated\ with\ @Public(Evolving).=09532d6b-7cb1-4621-90af-755558763875
+Classes\ in\ API\ packages\ should\ have\ at\ least\ one\ API\ visibility\ annotation.=143fca50-a3b9-4a4b-983e-40dd2c424f62
 ITCASE\ tests\ should\ use\ a\ MiniCluster\ resource\ or\ extension=dd583797-83e1-414c-a38d-330773978813
+Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @Public\ must\ be\ annotated\ with\ @Public.=06cb39ec-97e2-4e4e-8aa7-cd92504b759c
diff --git a/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java b/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java
new file mode 100644
index 0000000..90edf6f
--- /dev/null
+++ b/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.flink.architecture;
+
+import org.apache.flink.architecture.common.ImportOptions;
+
+import com.tngtech.archunit.core.importer.ImportOption;
+import com.tngtech.archunit.core.importer.Location;
+import com.tngtech.archunit.junit.AnalyzeClasses;
+import com.tngtech.archunit.junit.ArchTest;
+import com.tngtech.archunit.junit.ArchTests;
+
+import java.util.regex.Pattern;
+
+/** product code Architecture tests. */
+@AnalyzeClasses(
+        packages = "org.apache.flink.connector",
+        importOptions = {
+            ImportOption.DoNotIncludeTests.class,
+            ImportOption.DoNotIncludeArchives.class,
+            ImportOptions.ExcludeScalaImportOption.class,
+            ImportOptions.ExcludeShadedImportOption.class
+        })
+public class ProductionCodeArchitectureTest {
+
+    @ArchTest
+    public static final ArchTests COMMON_TESTS = ArchTests.in(ProductionCodeArchitectureBase.class);
+
+    /** test. */
+    public static final class MavenMainClassesOnly implements ImportOption {
+        private static final Pattern MAVEN = Pattern.compile(".*/target/classes/.*");
+
+        @Override
+        public boolean includes(Location location) {
+            return location.matches(MAVEN);
+        }
+    }
+}


[flink-connector-elasticsearch] 01/06: [FLINK-27061][maven] fix relative path bug.

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martijnvisser pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-elasticsearch.git

commit efa3b150027afbac740db7956a52b9b1f908b83a
Author: Jing Ge <ge...@gmail.com>
AuthorDate: Wed Apr 6 17:13:36 2022 +0200

    [FLINK-27061][maven] fix relative path bug.
---
 flink-connector-elasticsearch-base/pom.xml | 1 -
 flink-connector-elasticsearch6/pom.xml     | 8 --------
 flink-connector-elasticsearch7/pom.xml     | 5 +++++
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/flink-connector-elasticsearch-base/pom.xml b/flink-connector-elasticsearch-base/pom.xml
index a5afd00..5884be3 100644
--- a/flink-connector-elasticsearch-base/pom.xml
+++ b/flink-connector-elasticsearch-base/pom.xml
@@ -27,7 +27,6 @@ under the License.
 		<groupId>org.apache.flink</groupId>
 		<artifactId>flink-connectors</artifactId>
 		<version>1.16-SNAPSHOT</version>
-		<relativePath>..</relativePath>
 	</parent>
 
 	<artifactId>flink-connector-elasticsearch-base</artifactId>
diff --git a/flink-connector-elasticsearch6/pom.xml b/flink-connector-elasticsearch6/pom.xml
index 3adae87..66b99b9 100644
--- a/flink-connector-elasticsearch6/pom.xml
+++ b/flink-connector-elasticsearch6/pom.xml
@@ -27,7 +27,6 @@ under the License.
 		<groupId>org.apache.flink</groupId>
 		<artifactId>flink-connectors</artifactId>
 		<version>1.16-SNAPSHOT</version>
-		<relativePath>..</relativePath>
 	</parent>
 
 	<artifactId>flink-connector-elasticsearch6</artifactId>
@@ -160,13 +159,6 @@ under the License.
 			<scope>test</scope>
 		</dependency>
 
-		<!-- ArchUit test dependencies -->
-
-		<dependency>
-			<groupId>org.apache.flink</groupId>
-			<artifactId>flink-architecture-tests-test</artifactId>
-			<scope>test</scope>
-		</dependency>
 	</dependencies>
 
 	<build>
diff --git a/flink-connector-elasticsearch7/pom.xml b/flink-connector-elasticsearch7/pom.xml
index 90c8427..0cda637 100644
--- a/flink-connector-elasticsearch7/pom.xml
+++ b/flink-connector-elasticsearch7/pom.xml
@@ -163,6 +163,11 @@ under the License.
 			<artifactId>flink-architecture-tests-test</artifactId>
 			<scope>test</scope>
 		</dependency>
+		<dependency>
+			<groupId>org.apache.flink</groupId>
+			<artifactId>flink-architecture-tests-production</artifactId>
+			<scope>test</scope>
+		</dependency>
 	</dependencies>
 
 	<build>


[flink-connector-elasticsearch] 04/06: [FLINK-27061][ES7] ArchUnit test for production code

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martijnvisser pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-elasticsearch.git

commit b2a13da7cd91e87450d481ef2173f6be6fb1b1f1
Author: Jing Ge <ge...@gmail.com>
AuthorDate: Wed Apr 6 17:18:22 2022 +0200

    [FLINK-27061][ES7] ArchUnit test for production code
---
 .../4ffc80d0-834c-4711-a2a4-f24948f0fd0f           |  0
 .../893771a6-9a82-4eb5-9719-fda012294928           |  0
 .../af589e22-ad7e-411d-b007-e09c72c65ef6           | 12 +++++++
 .../f3cbf8e9-b63f-492e-8870-cf4b0970188a           |  0
 .../fc6d0585-2b27-4173-9b55-f7b3e54c6f0b           |  0
 .../archunit-violations/stored.rules               |  7 +++-
 .../ProductionCodeArchitectureTest.java            | 41 ++++++++++++++++++++++
 7 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/flink-connector-elasticsearch7/archunit-violations/4ffc80d0-834c-4711-a2a4-f24948f0fd0f b/flink-connector-elasticsearch7/archunit-violations/4ffc80d0-834c-4711-a2a4-f24948f0fd0f
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch7/archunit-violations/893771a6-9a82-4eb5-9719-fda012294928 b/flink-connector-elasticsearch7/archunit-violations/893771a6-9a82-4eb5-9719-fda012294928
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch7/archunit-violations/af589e22-ad7e-411d-b007-e09c72c65ef6 b/flink-connector-elasticsearch7/archunit-violations/af589e22-ad7e-411d-b007-e09c72c65ef6
new file mode 100644
index 0000000..c3a9600
--- /dev/null
+++ b/flink-connector-elasticsearch7/archunit-violations/af589e22-ad7e-411d-b007-e09c72c65ef6
@@ -0,0 +1,12 @@
+org.apache.flink.connector.base.DeliveryGuarantee.getDescription(): Returned leaf type org.apache.flink.configuration.description.InlineElement does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.base.source.hybrid.HybridSource.builder(org.apache.flink.api.connector.source.Source): Returned leaf type org.apache.flink.connector.base.source.hybrid.HybridSource$HybridSourceBuilder does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.base.source.hybrid.HybridSource.createEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext): Argument leaf type org.apache.flink.connector.base.source.hybrid.HybridSourceSplit does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.base.source.hybrid.HybridSource.createEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext): Returned leaf type org.apache.flink.connector.base.source.hybrid.HybridSourceEnumeratorState does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.base.source.hybrid.HybridSource.createEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext): Returned leaf type org.apache.flink.connector.base.source.hybrid.HybridSourceSplit does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.base.source.hybrid.HybridSource.createReader(org.apache.flink.api.connector.source.SourceReaderContext): Returned leaf type org.apache.flink.connector.base.source.hybrid.HybridSourceSplit does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.base.source.hybrid.HybridSource.getEnumeratorCheckpointSerializer(): Returned leaf type org.apache.flink.connector.base.source.hybrid.HybridSourceEnumeratorState does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.base.source.hybrid.HybridSource.getSplitSerializer(): Returned leaf type org.apache.flink.connector.base.source.hybrid.HybridSourceSplit does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.base.source.hybrid.HybridSource.restoreEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext, org.apache.flink.connector.base.source.hybrid.HybridSourceEnumeratorState): Argument leaf type org.apache.flink.connector.base.source.hybrid.HybridSourceEnumeratorState does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @ [...]
+org.apache.flink.connector.base.source.hybrid.HybridSource.restoreEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext, org.apache.flink.connector.base.source.hybrid.HybridSourceEnumeratorState): Argument leaf type org.apache.flink.connector.base.source.hybrid.HybridSourceSplit does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated
+org.apache.flink.connector.base.source.hybrid.HybridSource.restoreEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext, org.apache.flink.connector.base.source.hybrid.HybridSourceEnumeratorState): Returned leaf type org.apache.flink.connector.base.source.hybrid.HybridSourceEnumeratorState does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @ [...]
+org.apache.flink.connector.base.source.hybrid.HybridSource.restoreEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext, org.apache.flink.connector.base.source.hybrid.HybridSourceEnumeratorState): Returned leaf type org.apache.flink.connector.base.source.hybrid.HybridSourceSplit does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated
\ No newline at end of file
diff --git a/flink-connector-elasticsearch7/archunit-violations/f3cbf8e9-b63f-492e-8870-cf4b0970188a b/flink-connector-elasticsearch7/archunit-violations/f3cbf8e9-b63f-492e-8870-cf4b0970188a
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch7/archunit-violations/fc6d0585-2b27-4173-9b55-f7b3e54c6f0b b/flink-connector-elasticsearch7/archunit-violations/fc6d0585-2b27-4173-9b55-f7b3e54c6f0b
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch7/archunit-violations/stored.rules b/flink-connector-elasticsearch7/archunit-violations/stored.rules
index f2bb6a7..e6865e8 100644
--- a/flink-connector-elasticsearch7/archunit-violations/stored.rules
+++ b/flink-connector-elasticsearch7/archunit-violations/stored.rules
@@ -1,4 +1,9 @@
 #
-#Tue Feb 22 12:17:16 CET 2022
+#Wed Apr 06 17:09:14 CEST 2022
+Options\ for\ connectors\ and\ formats\ should\ reside\ in\ a\ consistent\ package\ and\ be\ public\ API.=f3cbf8e9-b63f-492e-8870-cf4b0970188a
+Production\ code\ must\ not\ call\ methods\ annotated\ with\ @VisibleForTesting=4ffc80d0-834c-4711-a2a4-f24948f0fd0f
 Tests\ inheriting\ from\ AbstractTestBase\ should\ have\ name\ ending\ with\ ITCase=1af7baaa-05dc-452a-9de7-653c8b3b324f
+Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @PublicEvolving\ must\ be\ annotated\ with\ @Public(Evolving).=af589e22-ad7e-411d-b007-e09c72c65ef6
+Classes\ in\ API\ packages\ should\ have\ at\ least\ one\ API\ visibility\ annotation.=fc6d0585-2b27-4173-9b55-f7b3e54c6f0b
 ITCASE\ tests\ should\ use\ a\ MiniCluster\ resource\ or\ extension=e1f30f33-c61c-4707-8c78-a3a80479564e
+Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @Public\ must\ be\ annotated\ with\ @Public.=893771a6-9a82-4eb5-9719-fda012294928
diff --git a/flink-connector-elasticsearch7/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java b/flink-connector-elasticsearch7/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java
new file mode 100644
index 0000000..5b9811c
--- /dev/null
+++ b/flink-connector-elasticsearch7/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.flink.architecture;
+
+import org.apache.flink.architecture.common.ImportOptions;
+
+import com.tngtech.archunit.core.importer.ImportOption;
+import com.tngtech.archunit.junit.AnalyzeClasses;
+import com.tngtech.archunit.junit.ArchTest;
+import com.tngtech.archunit.junit.ArchTests;
+
+/** product code Architecture tests. */
+@AnalyzeClasses(
+        packages = "org.apache.flink.connector",
+        importOptions = {
+            ImportOption.DoNotIncludeTests.class,
+            ImportOption.DoNotIncludeArchives.class,
+            ImportOptions.ExcludeScalaImportOption.class,
+            ImportOptions.ExcludeShadedImportOption.class
+        })
+public class ProductionCodeArchitectureTest {
+
+    @ArchTest
+    public static final ArchTests COMMON_TESTS = ArchTests.in(ProductionCodeArchitectureBase.class);
+}


[flink-connector-elasticsearch] 05/06: [FLINK-27061][ES6] ArchUnit test for production code

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

martijnvisser pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-elasticsearch.git

commit 85e02e019b04697746e7ae10e342d31261522ecc
Author: Jing Ge <ge...@gmail.com>
AuthorDate: Wed Apr 6 17:19:02 2022 +0200

    [FLINK-27061][ES6] ArchUnit test for production code
---
 .../07e22212-0fdc-435a-9a8b-aca438213316           |  0
 .../3010cd85-0143-4cff-9095-1f24a1979f7f           |  0
 .../795761fe-68cf-40d9-8ed8-bc6f47cb2292           |  0
 .../82e2a33f-9c4b-49ed-95d5-2319a9ae5e1f           |  0
 .../a4b5cf92-8e7d-43af-9d55-c693e352a3bc           |  0
 .../archunit-violations/stored.rules               |  7 +++-
 .../ProductionCodeArchitectureTest.java            | 41 ++++++++++++++++++++++
 7 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/flink-connector-elasticsearch6/archunit-violations/07e22212-0fdc-435a-9a8b-aca438213316 b/flink-connector-elasticsearch6/archunit-violations/07e22212-0fdc-435a-9a8b-aca438213316
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch6/archunit-violations/3010cd85-0143-4cff-9095-1f24a1979f7f b/flink-connector-elasticsearch6/archunit-violations/3010cd85-0143-4cff-9095-1f24a1979f7f
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch6/archunit-violations/795761fe-68cf-40d9-8ed8-bc6f47cb2292 b/flink-connector-elasticsearch6/archunit-violations/795761fe-68cf-40d9-8ed8-bc6f47cb2292
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch6/archunit-violations/82e2a33f-9c4b-49ed-95d5-2319a9ae5e1f b/flink-connector-elasticsearch6/archunit-violations/82e2a33f-9c4b-49ed-95d5-2319a9ae5e1f
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch6/archunit-violations/a4b5cf92-8e7d-43af-9d55-c693e352a3bc b/flink-connector-elasticsearch6/archunit-violations/a4b5cf92-8e7d-43af-9d55-c693e352a3bc
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-elasticsearch6/archunit-violations/stored.rules b/flink-connector-elasticsearch6/archunit-violations/stored.rules
index 10c711f..f55e96b 100644
--- a/flink-connector-elasticsearch6/archunit-violations/stored.rules
+++ b/flink-connector-elasticsearch6/archunit-violations/stored.rules
@@ -1,4 +1,9 @@
 #
-#Tue Feb 22 12:17:08 CET 2022
+#Wed Apr 06 17:07:17 CEST 2022
+Options\ for\ connectors\ and\ formats\ should\ reside\ in\ a\ consistent\ package\ and\ be\ public\ API.=795761fe-68cf-40d9-8ed8-bc6f47cb2292
+Production\ code\ must\ not\ call\ methods\ annotated\ with\ @VisibleForTesting=a4b5cf92-8e7d-43af-9d55-c693e352a3bc
 Tests\ inheriting\ from\ AbstractTestBase\ should\ have\ name\ ending\ with\ ITCase=25e52d29-fa7e-42fa-a571-b5c76235df52
+Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @PublicEvolving\ must\ be\ annotated\ with\ @Public(Evolving).=3010cd85-0143-4cff-9095-1f24a1979f7f
+Classes\ in\ API\ packages\ should\ have\ at\ least\ one\ API\ visibility\ annotation.=07e22212-0fdc-435a-9a8b-aca438213316
 ITCASE\ tests\ should\ use\ a\ MiniCluster\ resource\ or\ extension=db3972e4-f3a3-45b2-9643-27cba0cef09d
+Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @Public\ must\ be\ annotated\ with\ @Public.=82e2a33f-9c4b-49ed-95d5-2319a9ae5e1f
diff --git a/flink-connector-elasticsearch6/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java b/flink-connector-elasticsearch6/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java
new file mode 100644
index 0000000..5b9811c
--- /dev/null
+++ b/flink-connector-elasticsearch6/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.flink.architecture;
+
+import org.apache.flink.architecture.common.ImportOptions;
+
+import com.tngtech.archunit.core.importer.ImportOption;
+import com.tngtech.archunit.junit.AnalyzeClasses;
+import com.tngtech.archunit.junit.ArchTest;
+import com.tngtech.archunit.junit.ArchTests;
+
+/** product code Architecture tests. */
+@AnalyzeClasses(
+        packages = "org.apache.flink.connector",
+        importOptions = {
+            ImportOption.DoNotIncludeTests.class,
+            ImportOption.DoNotIncludeArchives.class,
+            ImportOptions.ExcludeScalaImportOption.class,
+            ImportOptions.ExcludeShadedImportOption.class
+        })
+public class ProductionCodeArchitectureTest {
+
+    @ArchTest
+    public static final ArchTests COMMON_TESTS = ArchTests.in(ProductionCodeArchitectureBase.class);
+}