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 2021/06/27 08:32:53 UTC

[GitHub] [flink-statefun] evans-ye opened a new pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

evans-ye opened a new pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242


   # What is the purpose of the change
   
   This JIRA focus on refactoring the existing statefun-smoke-e2e module into:
   * statefun-smoke-e2e-common (smoke e2e testing framework such as source, sink, verification, etc)
   * statefun-smoke-e2e-embedded (embedded java function)
   
   The end goal of this refactoring is to decouple testing framework with different kinds of functions(embedded, remote Java/Go/Python functions) so that we can have a unified testing framework to test those functions as a whole. Testing other language SDKs will be covered in the umbrella JIRA FLINK-23125.
   
   Brief change log
   1. Let smoke-e2e-embedded module depends on smoke-e2e-common module, and build into fat-jar for runtime e2e testing.
   2. In smoke-e2e-embedded, protobuf classes are pre-generated  since for different kind of SDKs, there might not have proper protobuf gen solution at build time. While smoke-e2e-common is remained to be generated at build time.
   3. Some naming refinement such as SimpleProtobufServer -> SimpleVerificationServer, source -> command-generator-source, sink -> discard-sink, verification -> verification-sink. However, more suitable naming is welcomed.
   
   # Verifying
   
   From project root, do mvn clean install -Prun-e2e-tests and it's passed.
   
   


-- 
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-statefun] evans-ye commented on pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
evans-ye commented on pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#issuecomment-878557565


   Changes Updated:
   1. Move _HarnessTest_ to Embedded module and tested by running on IDE.
   2. Rename _Fn_ to _CommandInterpreterFn_, rename _SmokeVerificationE2E_ to _SmokeVerificationEmbeddedE2E_
   3. Make declared PersistedValue name capital: _state_ -> _STATE_.


-- 
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-statefun] evans-ye edited a comment on pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
evans-ye edited a comment on pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#issuecomment-878557565


   Changes Updated:
   1. Move _HarnessTest_ to Embedded module and tested by running on IDE.
   2. Rename _Fn_ to _CommandInterpreterFn_, rename _SmokeVerificationE2E_ to _SmokeVerificationEmbeddedE2E_
   3. Make declared PersistedValue name capital: _state_ -> _STATE_.
   4. Remove _<scope>compile</scope>_ as you suggested.
   5. Commit those 2 suggested changes: _<version>${project.version}</version>_.


-- 
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-statefun] tzulitai commented on a change in pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
tzulitai commented on a change in pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#discussion_r667695974



##########
File path: statefun-e2e-tests/statefun-smoke-e2e-embedded/pom.xml
##########
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>statefun-e2e-tests</artifactId>
+        <groupId>org.apache.flink</groupId>
+        <version>3.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>statefun-smoke-e2e-embedded</artifactId>
+
+    <dependencies>
+        <!-- Stateful Functions -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-sdk-embedded</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-sdk-protos</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-flink-io</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-flink-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- Protobuf -->
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+
+        <!-- End-to-end test common -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-e2e-tests-common</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <exclusions>
+                <!-- conflicts with flink-core -->
+                <exclusion>
+                    <groupId>com.kohlschutter.junixsocket</groupId>
+                    <artifactId>junixsocket-native-common</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-flink-harness</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <exclusions>
+                <!-- conflicts with testcontainers -->
+                <exclusion>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                    <artifactId>jackson-annotations</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- smoke end-to-end common -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-smoke-e2e-common</artifactId>
+            <version>3.1-SNAPSHOT</version>

Review comment:
       ```suggestion
               <version>${project.version}</version>
   ```

##########
File path: statefun-e2e-tests/statefun-smoke-e2e-embedded/pom.xml
##########
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>statefun-e2e-tests</artifactId>
+        <groupId>org.apache.flink</groupId>
+        <version>3.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>statefun-smoke-e2e-embedded</artifactId>
+
+    <dependencies>
+        <!-- Stateful Functions -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-sdk-embedded</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-sdk-protos</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-flink-io</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-flink-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- Protobuf -->
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+
+        <!-- End-to-end test common -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-e2e-tests-common</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <exclusions>
+                <!-- conflicts with flink-core -->
+                <exclusion>
+                    <groupId>com.kohlschutter.junixsocket</groupId>
+                    <artifactId>junixsocket-native-common</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-flink-harness</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <exclusions>
+                <!-- conflicts with testcontainers -->
+                <exclusion>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                    <artifactId>jackson-annotations</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- smoke end-to-end common -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-smoke-e2e-common</artifactId>
+            <version>3.1-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-smoke-e2e-common</artifactId>
+            <version>3.1-SNAPSHOT</version>

Review comment:
       ```suggestion
               <version>${project.version}</version>
   ```

##########
File path: statefun-e2e-tests/statefun-smoke-e2e-embedded/pom.xml
##########
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>statefun-e2e-tests</artifactId>
+        <groupId>org.apache.flink</groupId>
+        <version>3.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>statefun-smoke-e2e-embedded</artifactId>
+
+    <dependencies>
+        <!-- Stateful Functions -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-sdk-embedded</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-sdk-protos</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-flink-io</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-flink-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- Protobuf -->
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>${protobuf.version}</version>
+        </dependency>
+
+        <!-- End-to-end test common -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-e2e-tests-common</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <exclusions>
+                <!-- conflicts with flink-core -->
+                <exclusion>
+                    <groupId>com.kohlschutter.junixsocket</groupId>
+                    <artifactId>junixsocket-native-common</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-flink-harness</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <exclusions>
+                <!-- conflicts with testcontainers -->
+                <exclusion>
+                    <groupId>com.fasterxml.jackson.core</groupId>
+                    <artifactId>jackson-annotations</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- smoke end-to-end common -->
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>statefun-smoke-e2e-common</artifactId>
+            <version>3.1-SNAPSHOT</version>
+            <scope>compile</scope>

Review comment:
       ```suggestion
   ```




-- 
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-statefun] evans-ye edited a comment on pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
evans-ye edited a comment on pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#issuecomment-878557565


   Changes Updated:
   1. Move _HarnessTest_ to Embedded module and tested by running on IDE.
   2. Rename _Fn_ to _CommandInterpreterFn_, rename _SmokeVerificationE2E_ to _SmokeVerificationEmbeddedE2E_
   3. Make declared PersistedValue name capital: _state_ -> _STATE_.
   4. Remove _\<scope\>compile\</scope\>_ as you suggested.
   5. Commit those 2 suggested changes: _\<version\>${project.version}\</version\>_.
   
   Verification:
   mvn clean install -Prun-e2e-tests succeed.


-- 
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-statefun] tzulitai closed pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
tzulitai closed pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242


   


-- 
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-statefun] evans-ye commented on pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
evans-ye commented on pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#issuecomment-878756030


   Hmmm. There's a build error:
   ```
   Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project statefun-smoke-e2e-embedded: Compilation failure
   Error:  /home/runner/work/flink-statefun/flink-statefun/statefun-e2e-tests/statefun-smoke-e2e-embedded/src/test/java/org/apache/flink/statefun/e2e/smoke/CommandInterpreterTest.java:[49,24] org.apache.flink.statefun.e2e.smoke.CommandInterpreterTest.MockContext is not abstract and does not override abstract method cancelDelayedMessage(java.lang.String) in org.apache.flink.statefun.sdk.Context
   ```
   
   Let me try to fix it.


-- 
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-statefun] evans-ye edited a comment on pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
evans-ye edited a comment on pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#issuecomment-878557565


   Changes Updated:
   1. Move _HarnessTest_ to Embedded module and tested by running on IDE.
   2. Rename _Fn_ to _CommandInterpreterFn_, rename _SmokeVerificationE2E_ to _SmokeVerificationEmbeddedE2E_
   3. Make declared PersistedValue name capital: _state_ -> _STATE_.
   4. Remove _\<scope\>compile\</scope\>_ as you suggested.
   5. Commit those 2 suggested changes: _<version>${project.version}</version>_.


-- 
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-statefun] tzulitai commented on pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
tzulitai commented on pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#issuecomment-878701752


   @evans-ye there seems to be a conflict with `master`. Could you do another rebase on `master` and resolve the conflict, and squash all the commits into one? Thank you!


-- 
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-statefun] evans-ye commented on pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
evans-ye commented on pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#issuecomment-879576979


   Thanks for the guidance and review @tzulitai .


-- 
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-statefun] evans-ye edited a comment on pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
evans-ye edited a comment on pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#issuecomment-878557565


   Changes Updated:
   1. Move _HarnessTest_ to Embedded module and tested by running on IDE.
   2. Rename _Fn_ to _CommandInterpreterFn_, rename _SmokeVerificationE2E_ to _SmokeVerificationEmbeddedE2E_
   3. Make declared PersistedValue name capital: _state_ -> _STATE_.
   4. Remove _\<scope\>compile\</scope\>_ as you suggested.
   5. Commit those 2 suggested changes: _\<version\>${project.version}\</version\>_.


-- 
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-statefun] evans-ye commented on pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
evans-ye commented on pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#issuecomment-878746659


   Yes sure.


-- 
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-statefun] tzulitai commented on pull request #242: [FLINK-23126] Refactor smoke-e2e into smoke-e2e-common and smoke-e2e-embedded

Posted by GitBox <gi...@apache.org>.
tzulitai commented on pull request #242:
URL: https://github.com/apache/flink-statefun/pull/242#issuecomment-879105485


   Thank you for the contribution @evans-ye! Merging this 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: issues-unsubscribe@flink.apache.org

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