You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/04 22:10:21 UTC

[GitHub] [flink] JingGe opened a new pull request, #19357: [Flink-26011][test] ArchUnit test for formats test code

JingGe opened a new pull request, #19357:
URL: https://github.com/apache/flink/pull/19357

   ## What is the purpose of the change
   
   Develop ArchUnit tests for the test code of formats. 
   
   
   ## Brief change log
   - Add ArchUnit tests for the test code of each format. 
   - add archunit.properties
   - Init violation stores
   
   ## Verifying this change
   
   This change add architectural tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (**yes** / no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] alpreu commented on pull request #19357: [Flink-26011][test] ArchUnit test for formats test code

Posted by GitBox <gi...@apache.org>.
alpreu commented on PR #19357:
URL: https://github.com/apache/flink/pull/19357#issuecomment-1091885411

   > > 
   > 
   > Thanks for the feedback. I think it would make less sense if subpackages are not included. Please see e.g.
   > 
   > https://github.com/apache/flink/blob/1e3e644a24202434749f9a1b51fda87af6d0054a/flink-architecture-tests/flink-architecture-tests-production/src/test/java/org/apache/flink/architecture/ArchitectureTest.java#L30
   
   Yes makes sense. I'll approve it then ;)


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #19357: [Flink-26011][test] ArchUnit test for formats test code

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #19357:
URL: https://github.com/apache/flink/pull/19357#issuecomment-1088067086

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "79a4ada4f2d28eec373ac46ece7f8bd75fbcfa4e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "79a4ada4f2d28eec373ac46ece7f8bd75fbcfa4e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 79a4ada4f2d28eec373ac46ece7f8bd75fbcfa4e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] alpreu commented on a diff in pull request #19357: [Flink-26011][test] ArchUnit test for formats test code

Posted by GitBox <gi...@apache.org>.
alpreu commented on code in PR #19357:
URL: https://github.com/apache/flink/pull/19357#discussion_r845073595


##########
flink-formats/flink-avro/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+/** Architecture tests for test code. */
+@AnalyzeClasses(
+        packages = {"org.apache.flink.formats.avro", "org.apache.flink.table.runtime.batch"},

Review Comment:
   Why is this test analyzing `"org.apache.flink.table.runtime.batch"`?



##########
flink-formats/flink-avro/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+/** Architecture tests for test code. */
+@AnalyzeClasses(
+        packages = {"org.apache.flink.formats.avro", "org.apache.flink.table.runtime.batch"},

Review Comment:
   Why is this test analyzing `"org.apache.flink.table.runtime.batch"`?



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] JingGe commented on pull request #19357: [Flink-26011][test] ArchUnit test for formats test code

Posted by GitBox <gi...@apache.org>.
JingGe commented on PR #19357:
URL: https://github.com/apache/flink/pull/19357#issuecomment-1091898328

   @MartijnVisser would you like to merge this PR? Thanks.


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] JingGe commented on pull request #19357: [Flink-26011][test] ArchUnit test for formats test code

Posted by GitBox <gi...@apache.org>.
JingGe commented on PR #19357:
URL: https://github.com/apache/flink/pull/19357#issuecomment-1088571724

   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] JingGe commented on pull request #19357: [Flink-26011][test] ArchUnit test for formats test code

Posted by GitBox <gi...@apache.org>.
JingGe commented on PR #19357:
URL: https://github.com/apache/flink/pull/19357#issuecomment-1091734076

   > 
   
   Thanks for the feedback. I think it would make less sense if subpackages are not included. Please see e.g. https://github.com/apache/flink/blob/1e3e644a24202434749f9a1b51fda87af6d0054a/flink-architecture-tests/flink-architecture-tests-production/src/test/java/org/apache/flink/architecture/ArchitectureTest.java#L30                


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] JingGe commented on a diff in pull request #19357: [Flink-26011][test] ArchUnit test for formats test code

Posted by GitBox <gi...@apache.org>.
JingGe commented on code in PR #19357:
URL: https://github.com/apache/flink/pull/19357#discussion_r845079509


##########
flink-formats/flink-avro/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+/** Architecture tests for test code. */
+@AnalyzeClasses(
+        packages = {"org.apache.flink.formats.avro", "org.apache.flink.table.runtime.batch"},

Review Comment:
   This should be the same question as the above one.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] MartijnVisser merged pull request #19357: [Flink-26011][test] ArchUnit test for formats test code

Posted by GitBox <gi...@apache.org>.
MartijnVisser merged PR #19357:
URL: https://github.com/apache/flink/pull/19357


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] alpreu commented on a diff in pull request #19357: [Flink-26011][test] ArchUnit test for formats test code

Posted by GitBox <gi...@apache.org>.
alpreu commented on code in PR #19357:
URL: https://github.com/apache/flink/pull/19357#discussion_r845082116


##########
flink-formats/flink-avro/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+/** Architecture tests for test code. */
+@AnalyzeClasses(
+        packages = {"org.apache.flink.formats.avro", "org.apache.flink.table.runtime.batch"},

Review Comment:
   Ohhh when I checked I accidentally looked at the src packages 🤦‍♂️ 



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] JingGe commented on a diff in pull request #19357: [Flink-26011][test] ArchUnit test for formats test code

Posted by GitBox <gi...@apache.org>.
JingGe commented on code in PR #19357:
URL: https://github.com/apache/flink/pull/19357#discussion_r845078612


##########
flink-formats/flink-avro/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+/** Architecture tests for test code. */
+@AnalyzeClasses(
+        packages = {"org.apache.flink.formats.avro", "org.apache.flink.table.runtime.batch"},

Review Comment:
   because there is a test under that package.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org