azagrebin commented on a change in pull request #20:
URL: https://github.com/apache/flink-docker/pull/20#discussion_r420910726
##########
File path: docker-entrypoint.sh
##########
@@ -18,6 +18,8 @@
# limitations under the License.
###############################################################################
+COMMAND_STANDALONE="standalone-job"
Review comment:
Is `standalone-job` already a stable name for the single job mode
because of its user-facing bin script?
I personally find it confusing. What about `single-jobmanager` and add
another alias for cluster mode: `cluster-jobmanager`?
##########
File path: testing/run_travis_tests.sh
##########
@@ -11,14 +11,6 @@ fi
BRANCH="$TRAVIS_BRANCH"
-if [ -n "$IS_PULL_REQUEST" ]; then
- changed_files="$(git diff --name-only $BRANCH...HEAD)"
Review comment:
why does it not work anymore? is `$BRANCH` not `dev-master` now?
##########
File path: docker-entrypoint.sh
##########
@@ -56,6 +58,27 @@ copy_plugins_if_required() {
done
}
+setup_usrlib() {
+ if [ -z "${USER_ARTIFACTS}" ]; then
+ return 0
+ fi
+
+ echo "Setting up usrlib"
+ for user_artifact in $(echo "${USER_ARTIFACTS}" | tr ';' ' '); do
+ echo "Adding artifact ${user_artifact} to usrlib directory."
+
+ mkdir -p "${FLINK_HOME}/usrlib"
Review comment:
```suggestion
mkdir -p "${FLINK_HOME}/usrlib"
for user_artifact in $(echo "${USER_ARTIFACTS}" | tr ';' ' '); do
echo "Adding artifact ${user_artifact} to usrlib directory."
```
moving `mkdir -p "${FLINK_HOME}/usrlib"` out of loop
##########
File path: testing/docker-test-job/pom.xml
##########
@@ -0,0 +1,75 @@
+<!--
+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="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.flink</groupId>
+ <artifactId>docker-test-job</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <properties>
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <flink.version>1.9.0</flink.version>
+ <java.version>1.8</java.version>
Review comment:
also, there is going to be Java 11
##########
File path: testing/docker-test-job/pom.xml
##########
@@ -0,0 +1,75 @@
+<!--
+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="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.flink</groupId>
+ <artifactId>docker-test-job</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <properties>
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <flink.version>1.9.0</flink.version>
Review comment:
is it `1.9` because it does not matter too much?
maybe one more place speaking for having flink version somewhere in one place
I suppose it could be rewritten while building it in `build_test_job()`
##########
File path: testing/testing_lib.sh
##########
@@ -178,17 +182,30 @@ function internal_smoke_test_images() {
create_network
trap cleanup EXIT RETURN
+ build_test_job
local jobmanager_container_id
local taskmanager_container_id
for dockerfile in $dockerfiles; do
build_image "$dockerfile"
- jobmanager_container_id="$(internal_run_jobmanager "$dockerfile"
"${docker_run_command_args}")"
+
+ jobmanager_container_id="$(internal_run_jobmanager "$dockerfile"
"${docker_run_command_args}" "jobmanager")"
taskmanager_container_id="$(internal_run_taskmanager "$dockerfile"
"${docker_run_command_args}")"
wait_for_jobmanager "$dockerfile"
test_image "$dockerfile"
docker kill "$jobmanager_container_id" "$taskmanager_container_id" >
/dev/null
+
+ jobmanager_container_id="$(internal_run_jobmanager \
+ "$dockerfile" \
+ "${docker_run_command_args} --mount
type=bind,src=$(pwd)/testing/docker-test-job/target,target=/jars -e
USER_ARTIFACTS=/jars" \
+ "standalone-job --job-classname org.apache.flink.StreamingJob")"
+ taskmanager_container_id="$(internal_run_taskmanager \
+ "$dockerfile" \
+ "${docker_run_command_args} --mount
type=bind,src=$(pwd)/testing/docker-test-job/target,target=/jars")"
+ wait_for_jobmanager "$dockerfile"
+ test_image "$dockerfile"
+ docker kill "$jobmanager_container_id" "$taskmanager_container_id" >
/dev/null
Review comment:
could it be deduplicated for cluster/job mode?
```sh
docker_run_command_args="${docker_run_command_args} --mount
type=bind,src=$(pwd)/testing/docker-test-job/target,target=/jars -e
USER_ARTIFACTS=/jars"
local jm_args="standalone-job --job-classname org.apache.flink.StreamingJob"
test_jm_tm ${dockerfile} ${docker_run_command_args} ${jm_args}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]