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/12/14 12:49:43 UTC

[flink-connector-jdbc] branch main updated (5eabc8d -> a679f46)

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-jdbc.git


    from 5eabc8d  [hotfix] Add licensing
     new f0b34b8  [hotfix][Architecture] Add ProductionCodeArchitectureTest
     new a679f46  [hotfix][Archunit] Add Archunit rule violations

The 2 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:
 ...-8be8-e7dfd8a384b0 => 0c7b60d6-a12c-432d-8a72-747cabaeb7ed} |  0
 ...-8be8-e7dfd8a384b0 => 4bca2274-65a9-4a61-81ef-767d58233ea0} |  0
 ...-8be8-e7dfd8a384b0 => 596bd7eb-1ed5-4963-a56a-941766d61233} |  0
 .../archunit-violations/b10c194a-0517-4744-830f-81abfb71ab18   |  2 ++
 .../archunit-violations/d45c3af5-52c6-45fd-9926-75e75e77473a   |  7 +++++++
 ...-8be8-e7dfd8a384b0 => f242ee43-a122-4d2f-a291-6439cdb9029f} |  0
 flink-connector-jdbc/archunit-violations/stored.rules          | 10 ++++++++--
 ...chitectureTest.java => ProductionCodeArchitectureTest.java} |  9 +++++----
 8 files changed, 22 insertions(+), 6 deletions(-)
 copy flink-connector-jdbc/archunit-violations/{0f94f11b-9bc8-445a-8be8-e7dfd8a384b0 => 0c7b60d6-a12c-432d-8a72-747cabaeb7ed} (100%)
 copy flink-connector-jdbc/archunit-violations/{0f94f11b-9bc8-445a-8be8-e7dfd8a384b0 => 4bca2274-65a9-4a61-81ef-767d58233ea0} (100%)
 copy flink-connector-jdbc/archunit-violations/{0f94f11b-9bc8-445a-8be8-e7dfd8a384b0 => 596bd7eb-1ed5-4963-a56a-941766d61233} (100%)
 create mode 100644 flink-connector-jdbc/archunit-violations/b10c194a-0517-4744-830f-81abfb71ab18
 create mode 100644 flink-connector-jdbc/archunit-violations/d45c3af5-52c6-45fd-9926-75e75e77473a
 copy flink-connector-jdbc/archunit-violations/{0f94f11b-9bc8-445a-8be8-e7dfd8a384b0 => f242ee43-a122-4d2f-a291-6439cdb9029f} (100%)
 copy flink-connector-jdbc/src/test/java/org/apache/flink/architecture/{TestCodeArchitectureTest.java => ProductionCodeArchitectureTest.java} (81%)


[flink-connector-jdbc] 02/02: [hotfix][Archunit] Add Archunit rule violations

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-jdbc.git

commit a679f4638c2a8cd5de0c5b716732ed5465d26472
Author: Martijn Visser <ma...@apache.org>
AuthorDate: Wed Dec 14 13:49:35 2022 +0100

    [hotfix][Archunit] Add Archunit rule violations
---
 .../archunit-violations/0c7b60d6-a12c-432d-8a72-747cabaeb7ed   |  0
 .../archunit-violations/4bca2274-65a9-4a61-81ef-767d58233ea0   |  0
 .../archunit-violations/596bd7eb-1ed5-4963-a56a-941766d61233   |  0
 .../archunit-violations/b10c194a-0517-4744-830f-81abfb71ab18   |  2 ++
 .../archunit-violations/d45c3af5-52c6-45fd-9926-75e75e77473a   |  7 +++++++
 .../archunit-violations/f242ee43-a122-4d2f-a291-6439cdb9029f   |  0
 flink-connector-jdbc/archunit-violations/stored.rules          | 10 ++++++++--
 7 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/flink-connector-jdbc/archunit-violations/0c7b60d6-a12c-432d-8a72-747cabaeb7ed b/flink-connector-jdbc/archunit-violations/0c7b60d6-a12c-432d-8a72-747cabaeb7ed
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-jdbc/archunit-violations/4bca2274-65a9-4a61-81ef-767d58233ea0 b/flink-connector-jdbc/archunit-violations/4bca2274-65a9-4a61-81ef-767d58233ea0
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-jdbc/archunit-violations/596bd7eb-1ed5-4963-a56a-941766d61233 b/flink-connector-jdbc/archunit-violations/596bd7eb-1ed5-4963-a56a-941766d61233
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-jdbc/archunit-violations/b10c194a-0517-4744-830f-81abfb71ab18 b/flink-connector-jdbc/archunit-violations/b10c194a-0517-4744-830f-81abfb71ab18
new file mode 100644
index 0000000..400c942
--- /dev/null
+++ b/flink-connector-jdbc/archunit-violations/b10c194a-0517-4744-830f-81abfb71ab18
@@ -0,0 +1,2 @@
+Class <org.apache.flink.connector.jdbc.internal.options.JdbcConnectorOptions> does not reside in a package 'org.apache.flink..table' in (JdbcConnectorOptions.java:0)
+org.apache.flink.connector.jdbc.internal.options.JdbcConnectorOptions does not satisfy: annotated with @PublicEvolving or annotated with @Public
\ No newline at end of file
diff --git a/flink-connector-jdbc/archunit-violations/d45c3af5-52c6-45fd-9926-75e75e77473a b/flink-connector-jdbc/archunit-violations/d45c3af5-52c6-45fd-9926-75e75e77473a
new file mode 100644
index 0000000..4f453d5
--- /dev/null
+++ b/flink-connector-jdbc/archunit-violations/d45c3af5-52c6-45fd-9926-75e75e77473a
@@ -0,0 +1,7 @@
+org.apache.flink.connector.jdbc.JdbcExactlyOnceOptions.builder(): Returned leaf type org.apache.flink.connector.jdbc.JdbcExactlyOnceOptions$JDBCExactlyOnceOptionsBuilder 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.jdbc.JdbcExecutionOptions.builder(): Returned leaf type org.apache.flink.connector.jdbc.JdbcExecutionOptions$Builder 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.jdbc.catalog.JdbcCatalog.getInternal(): Returned leaf type org.apache.flink.connector.jdbc.catalog.AbstractJdbcCatalog 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.jdbc.dialect.AbstractDialect.decimalPrecisionRange(): Returned leaf type org.apache.flink.connector.jdbc.dialect.AbstractDialect$Range 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.jdbc.dialect.AbstractDialect.timestampPrecisionRange(): Returned leaf type org.apache.flink.connector.jdbc.dialect.AbstractDialect$Range 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.jdbc.xa.XaSinkStateHandler.load(org.apache.flink.runtime.state.FunctionInitializationContext): Returned leaf type org.apache.flink.connector.jdbc.xa.JdbcXaSinkFunctionState 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.jdbc.xa.XaSinkStateHandler.store(org.apache.flink.connector.jdbc.xa.JdbcXaSinkFunctionState): Argument leaf type org.apache.flink.connector.jdbc.xa.JdbcXaSinkFunctionState 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-jdbc/archunit-violations/f242ee43-a122-4d2f-a291-6439cdb9029f b/flink-connector-jdbc/archunit-violations/f242ee43-a122-4d2f-a291-6439cdb9029f
new file mode 100644
index 0000000..e69de29
diff --git a/flink-connector-jdbc/archunit-violations/stored.rules b/flink-connector-jdbc/archunit-violations/stored.rules
index ee4778c..b471f5b 100644
--- a/flink-connector-jdbc/archunit-violations/stored.rules
+++ b/flink-connector-jdbc/archunit-violations/stored.rules
@@ -1,4 +1,10 @@
 #
-#Thu Jul 28 14:21:00 CST 2022
-Tests\ inheriting\ from\ AbstractTestBase\ should\ have\ name\ ending\ with\ ITCase=0f94f11b-9bc8-445a-8be8-e7dfd8a384b0
+#Wed Dec 14 13:38:22 CET 2022
+Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @Public\ must\ be\ annotated\ with\ @Public.=596bd7eb-1ed5-4963-a56a-941766d61233
+Connector\ production\ code\ must\ not\ depend\ on\ non-public\ API\ outside\ of\ connector\ packages=f242ee43-a122-4d2f-a291-6439cdb9029f
 ITCASE\ tests\ should\ use\ a\ MiniCluster\ resource\ or\ extension=6b9ab1b0-c14d-4667-bab5-407b81fba98b
+Production\ code\ must\ not\ call\ methods\ annotated\ with\ @VisibleForTesting=4bca2274-65a9-4a61-81ef-767d58233ea0
+Tests\ inheriting\ from\ AbstractTestBase\ should\ have\ name\ ending\ with\ ITCase=0f94f11b-9bc8-445a-8be8-e7dfd8a384b0
+Options\ for\ connectors\ and\ formats\ should\ reside\ in\ a\ consistent\ package\ and\ be\ public\ API.=b10c194a-0517-4744-830f-81abfb71ab18
+Return\ and\ argument\ types\ of\ methods\ annotated\ with\ @PublicEvolving\ must\ be\ annotated\ with\ @Public(Evolving).=d45c3af5-52c6-45fd-9926-75e75e77473a
+Classes\ in\ API\ packages\ should\ have\ at\ least\ one\ API\ visibility\ annotation.=0c7b60d6-a12c-432d-8a72-747cabaeb7ed


[flink-connector-jdbc] 01/02: [hotfix][Architecture] Add ProductionCodeArchitectureTest

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-jdbc.git

commit f0b34b8ba1d1012c019464fcba591d8c94aa43f1
Author: Martijn Visser <ma...@apache.org>
AuthorDate: Wed Dec 14 13:28:46 2022 +0100

    [hotfix][Architecture] Add ProductionCodeArchitectureTest
---
 .../ProductionCodeArchitectureTest.java            | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/flink-connector-jdbc/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java b/flink-connector-jdbc/src/test/java/org/apache/flink/architecture/ProductionCodeArchitectureTest.java
new file mode 100644
index 0000000..e88416b
--- /dev/null
+++ b/flink-connector-jdbc/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;
+
+/** production code for Architecture tests. */
+@AnalyzeClasses(
+        packages = "org.apache.flink.connector.jdbc",
+        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);
+}