[ 
https://issues.apache.org/jira/browse/FLINK-10481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687930#comment-16687930
 ] 

ASF GitHub Bot commented on FLINK-10481:
----------------------------------------

kl0u commented on a change in pull request #7074: [FLINK-10481][e2e] Added 
retry logic for building docker image
URL: https://github.com/apache/flink/pull/7074#discussion_r233818875
 
 

 ##########
 File path: flink-end-to-end-tests/test-scripts/test_docker_embedded_job.sh
 ##########
 @@ -30,14 +32,23 @@ export INPUT_PATH=/data/test/input
 export OUTPUT_PATH=/data/test/output
 export FLINK_JOB_ARGUMENTS="--input ${INPUT_PATH}/words --output 
${OUTPUT_PATH}/docker_wc_out"
 
-# user inside the container must be able to createto workaround in-container 
permissions
+build_image() {
+    cd "$DOCKER_MODULE_DIR"
 
 Review comment:
   I would put the `cd "$DOCKER_MODULE_DIR"` and `cd "$END_TO_END_DIR"` around 
the `if` statement for clarity and also leave the `mkdir -p $OUTPUT_VOLUME` and 
`chmod 777 $OUTPUT_VOLUME` on top, so that the test fails fast if we do not 
have the necessary permissions.
   
   In other words, it could look sth like:
   ```
   build_image() {
       ./build.sh --from-local-dist --job-jar 
${FLINK_DIR}/examples/batch/WordCount.jar --image-name 
${FLINK_DOCKER_IMAGE_NAME}
       local error_code=$?
       return ${error_code}
   }
   
   # user inside the container must be able to create files, this is a 
workaround in-container permissions
   mkdir -p $OUTPUT_VOLUME
   chmod 777 $OUTPUT_VOLUME
   
   cd "$DOCKER_MODULE_DIR"
   if ! retry_times $DOCKER_IMAGE_BUILD_RETRIES ${BUILD_BACKOFF_TIME} 
build_image; then
       echo "Failed to build docker image. Aborting..."
       exit 1
   fi
   cd "$END_TO_END_DIR"
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Wordcount end-to-end test in docker env unstable
> ------------------------------------------------
>
>                 Key: FLINK-10481
>                 URL: https://issues.apache.org/jira/browse/FLINK-10481
>             Project: Flink
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 1.7.0
>            Reporter: Till Rohrmann
>            Assignee: Dawid Wysakowicz
>            Priority: Critical
>              Labels: pull-request-available, test-stability
>             Fix For: 1.5.6, 1.6.3, 1.7.0
>
>
> The {{Wordcount end-to-end test in docker env}} fails sometimes on Travis 
> with the following problem:
> {code}
> Status: Downloaded newer image for java:8-jre-alpine
>  ---> fdc893b19a14
> Step 2/16 : RUN apk add --no-cache bash snappy
>  ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
>  ---> Running in 4329ebcd8a77
> fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
> WARNING: Ignoring 
> http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz: 
> temporary error (try again later)
> fetch 
> http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
> WARNING: Ignoring 
> http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz: 
> temporary error (try again later)
> ERROR: unsatisfiable constraints:
>   bash (missing):
>     required by: world[bash]
>   snappy (missing):
>     required by: world[snappy]
> The command '/bin/sh -c apk add --no-cache bash snappy' returned a non-zero 
> code: 2
> {code}
> https://api.travis-ci.org/v3/job/434909395/log.txt
> It seems as if it is related to 
> https://github.com/gliderlabs/docker-alpine/issues/264 and 
> https://github.com/gliderlabs/docker-alpine/issues/279.
> We might want to switch to a different base image to avoid these problems in 
> the future.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to