tzulitai commented on a change in pull request #248: URL: https://github.com/apache/flink-statefun/pull/248#discussion_r684589078
########## File path: statefun-e2e-tests/statefun-smoke-e2e-java/pom.xml ########## @@ -0,0 +1,140 @@ +<?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-java</artifactId> + + <properties> + <commons-math3.version>3.5</commons-math3.version> + <additional-sources.dir>target/additional-sources</additional-sources.dir> + </properties> + + <dependencies> + <!-- Stateful Functions --> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>statefun-sdk-java</artifactId> + <version>${project.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> Review comment: Since we haven't added the harness test yet, let's remove the harness dependency for now for sake of clarity. ########## File path: statefun-e2e-tests/statefun-smoke-e2e-java/pom.xml ########## @@ -0,0 +1,140 @@ +<?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-java</artifactId> + + <properties> + <commons-math3.version>3.5</commons-math3.version> + <additional-sources.dir>target/additional-sources</additional-sources.dir> Review comment: These properties are not needed. ########## File path: statefun-e2e-tests/statefun-smoke-e2e-java/pom.xml ########## @@ -0,0 +1,140 @@ +<?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-java</artifactId> + + <properties> + <commons-math3.version>3.5</commons-math3.version> + <additional-sources.dir>target/additional-sources</additional-sources.dir> + </properties> + + <dependencies> + <!-- Stateful Functions --> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>statefun-sdk-java</artifactId> + <version>${project.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> Review comment: The only 3 reasons why `statefun-smoke-e2e-java` currently needs to depend on `statefun-smoke-e2e-common` is because of the `ModuleParameters` class, `Ids` class, and `Constants` class, which all currently resides in the main jar and not the `test-jar`. Since `ModuleParameters` will be used by the downstream JUnit tests, I think we should make a copy of that class in the `test-jar` of `statefun-smoke-e2e-common` as well. As for the `Ids` class - downstream multilang smoke E2Es should have their own implementation of that class (imagine the Go smoke E2E - they need to reimplement `Ids` in Golang). Lets not make an exception for the Java remote E2E, and let it implement its own `Ids` class as well. As for the `Constants` class - we can expect downstream E2Es to just use plain strings. With the above changes, it should be possible to remove the dependency on `statefun-smoke-e2e-common`. ########## File path: statefun-e2e-tests/statefun-smoke-e2e-java/pom.xml ########## @@ -0,0 +1,140 @@ +<?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-java</artifactId> + + <properties> + <commons-math3.version>3.5</commons-math3.version> + <additional-sources.dir>target/additional-sources</additional-sources.dir> + </properties> + + <dependencies> + <!-- Stateful Functions --> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>statefun-sdk-java</artifactId> + <version>${project.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> Review comment: Towards this end, it might be worthwhile to rename `statefun-smoke-e2e-common` to `statefun-smoke-e2e-driver`, now that I think about it. ########## File path: statefun-e2e-tests/statefun-smoke-e2e-java/src/main/java/org/apache/flink/statefun/e2e/smoke/CommandInterpreter.java ########## @@ -0,0 +1,161 @@ +/* + * 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.statefun.e2e.smoke; + +import java.time.Duration; +import java.util.Objects; +import org.apache.flink.statefun.e2e.smoke.generated.Command; +import org.apache.flink.statefun.e2e.smoke.generated.Commands; +import org.apache.flink.statefun.e2e.smoke.generated.SourceCommand; +import org.apache.flink.statefun.e2e.smoke.generated.VerificationResult; +import org.apache.flink.statefun.sdk.java.*; +import org.apache.flink.statefun.sdk.java.message.EgressMessage; +import org.apache.flink.statefun.sdk.java.message.EgressMessageBuilder; +import org.apache.flink.statefun.sdk.java.message.Message; +import org.apache.flink.statefun.sdk.java.message.MessageBuilder; +import org.apache.flink.statefun.sdk.java.types.SimpleType; +import org.apache.flink.statefun.sdk.java.types.Type; + +public final class CommandInterpreter { + private final Ids ids; + private static final Duration sendAfterDelay = Duration.ofMillis(1); + + static final Type<Command> COMMAND_TYPE = + SimpleType.simpleImmutableTypeFrom( + TypeName.typeNameOf(Constants.PROTOBUF_NAMESPACE, Command.getDescriptor().getFullName()), + Command::toByteArray, + Command::parseFrom); + + static final Type<Commands> COMMANDS_TYPE = + SimpleType.simpleImmutableTypeFrom( + TypeName.typeNameOf(Constants.PROTOBUF_NAMESPACE, Commands.getDescriptor().getFullName()), + Commands::toByteArray, + Commands::parseFrom); + + static final Type<SourceCommand> SOURCE_COMMAND_TYPE = + SimpleType.simpleImmutableTypeFrom( + TypeName.typeNameOf( + Constants.PROTOBUF_NAMESPACE, SourceCommand.getDescriptor().getFullName()), + SourceCommand::toByteArray, + SourceCommand::parseFrom); + + static final Type<VerificationResult> VERIFICATION_RESULT_TYPE = + SimpleType.simpleImmutableTypeFrom( + TypeName.typeNameOf( + Constants.PROTOBUF_NAMESPACE, VerificationResult.getDescriptor().getFullName()), + VerificationResult::toByteArray, + VerificationResult::parseFrom); + + static final TypeName DISCARD_EGRESS_TYPENAME = + TypeName.typeNameOf(Constants.NAMESPACE, Constants.EGRESS_NAME); + + static final TypeName VERIFICATION_EGRESS_TYPENAME = + TypeName.typeNameOf(Constants.NAMESPACE, Constants.VERIFICATION_EGRESS_NAME); + + public CommandInterpreter(Ids ids) { + this.ids = Objects.requireNonNull(ids); + } + + public void interpret(ValueSpec<Long> state, Context context, Message message) { + if (message.is(SOURCE_COMMAND_TYPE)) { + interpret(state, context, message.as(SOURCE_COMMAND_TYPE).getCommands()); + } else if (message.is(COMMANDS_TYPE)) { + interpret(state, context, message.as(COMMANDS_TYPE)); + } else { + throw new IllegalArgumentException("Unrecognized message type " + message.valueTypeName()); + } + } + + private void interpret(ValueSpec<Long> state, Context context, Commands cmds) { + for (Command cmd : cmds.getCommandList()) { + if (cmd.hasIncrement()) { + modifyState(state, context, cmd.getIncrement()); + } else if (cmd.hasSend()) { + send(state, context, cmd.getSend()); + } else if (cmd.hasSendAfter()) { + sendAfter(state, context, cmd.getSendAfter()); + } else if (cmd.hasSendEgress()) { + sendEgress(state, context, cmd.getSendEgress()); + } else if (cmd.hasVerify()) { + verify(state, context, cmd.getVerify()); + } + } + } + + private void verify( + ValueSpec<Long> state, @SuppressWarnings("unused") Context context, Command.Verify verify) { + AddressScopedStorage storage = context.storage(); + int selfId = Integer.parseInt(context.self().id()); + long actual = storage.get(state).orElse(0L); + long expected = verify.getExpected(); + VerificationResult verificationResult = + VerificationResult.newBuilder() + .setId(selfId) + .setActual(actual) + .setExpected(expected) + .build(); + EgressMessage egressMessage = + EgressMessageBuilder.forEgress(VERIFICATION_EGRESS_TYPENAME) + .withCustomType(VERIFICATION_RESULT_TYPE, verificationResult) + .build(); + context.send(egressMessage); + } + + private void sendEgress( + @SuppressWarnings("unused") ValueSpec<Long> state, + Context context, + @SuppressWarnings("unused") Command.SendEgress sendEgress) { + EgressMessage egressMessage = + EgressMessageBuilder.forEgress(DISCARD_EGRESS_TYPENAME) + .withCustomType(COMMAND_TYPE, Command.getDefaultInstance()) + .build(); Review comment: You don't have to send a command here, just any random object e.g. string will do. The value argument in this case isn't important as it'll just be discarded by the driver. ```suggestion EgressMessage egressMessage = EgressMessageBuilder.forEgress(DISCARD_EGRESS_TYPENAME) .withValue("discarded-message") .build(); ``` ########## File path: statefun-e2e-tests/statefun-smoke-e2e-java/pom.xml ########## @@ -0,0 +1,140 @@ +<?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-java</artifactId> + + <properties> + <commons-math3.version>3.5</commons-math3.version> + <additional-sources.dir>target/additional-sources</additional-sources.dir> + </properties> + + <dependencies> + <!-- Stateful Functions --> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>statefun-sdk-java</artifactId> + <version>${project.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> + <type>test-jar</type> + <scope>test</scope> + </dependency> + + <!-- Undertow web server --> + <dependency> + <groupId>io.undertow</groupId> + <artifactId>undertow-core</artifactId> + <version>1.4.18.Final</version> + </dependency> + </dependencies> + + <build> + <plugins> + <!-- build uber jar for launching the remote function --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>3.3.0</version> + <configuration> + <descriptorRefs> + <descriptorRef>jar-with-dependencies</descriptorRef> + </descriptorRefs> + <archive> + <manifest> + <mainClass>org.apache.flink.statefun.e2e.smoke.CommandInterpreterAppServer</mainClass> + </manifest> + </archive> + </configuration> + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + + <!-- download smoke e2e common jar for launching flink statefun cluster --> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <phase>install</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory>${project.build.directory}/lib</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> Review comment: I think this isn't the correct plugin to use. Please use this: ```suggestion <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy</id> <phase>package</phase> <goals> <goal>copy</goal> </goals> </execution> </executions> <configuration> <artifactItems> <artifactItem> <groupId>org.apache.flink</groupId> <artifactId>statefun-smoke-e2e-common</artifactId> <version>${project.version}</version> <type>jar</type> <overWrite>true</overWrite> <outputDirectory>${project.build.directory}</outputDirectory> <destFileName>statefun-smoke-e2e-driver.jar</destFileName> </artifactItem> </artifactItems> </configuration> </plugin> ``` This plugin will then copy the `statefun-smoke-e2e-common` jar into `target/statefun-smoke-e2e-driver.jar`. Then, in the `Dockerfile`, you can do `COPY statefun-smoke-e2e-driver.jar ...`. ########## File path: statefun-e2e-tests/statefun-smoke-e2e-java/src/test/resources/Dockerfile ########## @@ -0,0 +1,21 @@ +# 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. + +FROM flink-statefun:3.1-SNAPSHOT + +RUN mkdir -p /opt/statefun/modules/statefun-smoke-e2e +COPY lib/statefun-smoke-e2e-common-*.jar /opt/statefun/modules/statefun-smoke-e2e/ Review comment: The E2E is currently failing in CI because of this line. There is no jar at `lib/statefun-smoke-e2e-common-*.jar`. I believe it is because you are not using the correct plugin for directly copying Maven artifacts. See my comment in the `pom.xml`. ########## File path: statefun-e2e-tests/statefun-smoke-e2e-java/pom.xml ########## @@ -0,0 +1,140 @@ +<?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-java</artifactId> + + <properties> + <commons-math3.version>3.5</commons-math3.version> + <additional-sources.dir>target/additional-sources</additional-sources.dir> + </properties> + + <dependencies> + <!-- Stateful Functions --> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>statefun-sdk-java</artifactId> + <version>${project.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> Review comment: I would like to remove `statefun-smoke-e2e-common` as a dependency on the child multilang E2E artifacts. ```suggestion ``` To recap the responsibility of `statefun-smoke-e2e-common`: 1. The normal main jar built from `statefun-smoke-e2e-common` should only contain the embedded module containing the necessary application components to drive the smoke E2E (e.g. command generator source). 2. The `test-jar` built from `statefun-smoke-e2e-common` contains the utilities to be used by the JUnit tests of the downstream multilang smoke E2Es. For example, `SmokeRunner` and `SimpleVerificationServer`. With this cleared out, the first normal main jar should always only be directly copied (using the Maven copy build plugin) and not used as a code dependency. The `test-jar` is always depended on only as a test dependency. ########## File path: statefun-e2e-tests/statefun-smoke-e2e-java/pom.xml ########## @@ -0,0 +1,140 @@ +<?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-java</artifactId> + + <properties> + <commons-math3.version>3.5</commons-math3.version> + <additional-sources.dir>target/additional-sources</additional-sources.dir> + </properties> + + <dependencies> + <!-- Stateful Functions --> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>statefun-sdk-java</artifactId> + <version>${project.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> Review comment: This exclusion is not needed, since this module doesn't depend on `flink-core` -- 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]
