You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rvesse <gi...@git.apache.org> on 2018/10/16 12:55:59 UTC

[GitHub] spark pull request #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh s...

GitHub user rvesse opened a pull request:

    https://github.com/apache/spark/pull/22748

    [SPARK-25745][K8S] Improve docker-image-tool.sh script

    ## What changes were proposed in this pull request?
    
    Adds error checking and handling to `docker` invocations ensuring the script terminates early in the event of any errors.  This avoids subtle errors that can occur e.g. if the base image fails to build the Python/R images can end up being built from outdated base images and makes it more explicit to the user that something went wrong.
    
    Additionally the provided `Dockerfiles` assume that Spark was first built locally or is a runnable distribution however it didn't previously enforce this.  The script will now check the JARs folder to ensure that Spark JARs actually exist and if not aborts early reminding the user they need to build locally first.
    
    ## How was this patch tested?
    
    - Tested with a `mvn clean` working copy and verified that the script now terminates early
    - Tested with bad `Dockerfiles` that fail to build to see that early termination occurred

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rvesse/spark SPARK-25745

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/22748.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #22748
    
----
commit beb4083d8351030ac2b07bf6aab68d3b0f555ac9
Author: Rob Vesse <rv...@...>
Date:   2018-10-16T12:48:46Z

    [SPARK-25745][K8S] Improve docker-image-tool.sh script
    
    - Actually check for failures from Docker commands and terminate early
    - Validate that Spark JARs are actually present before attempting the
      Docker build

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97620/
    Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    **[Test build #97618 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97618/testReport)** for PR 22748 at commit [`a9516f0`](https://github.com/apache/spark/commit/a9516f03bb138be09734ef35fd934f41c16bbff5).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by ifilonenko <gi...@git.apache.org>.
Github user ifilonenko commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    retest this please


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    **[Test build #97619 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97619/testReport)** for PR 22748 at commit [`a9516f0`](https://github.com/apache/spark/commit/a9516f03bb138be09734ef35fd934f41c16bbff5).
     * This patch **fails PySpark pip packaging tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh s...

Posted by liyinan926 <gi...@git.apache.org>.
Github user liyinan926 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22748#discussion_r225615239
  
    --- Diff: bin/docker-image-tool.sh ---
    @@ -78,20 +91,38 @@ function build {
       docker build $NOCACHEARG "${BUILD_ARGS[@]}" \
         -t $(image_ref spark) \
         -f "$BASEDOCKERFILE" .
    +  if [ $? -ne 0 ]; then
    +    error "Failed to build base Docker image, please refer to Docker build output for details"
    --- End diff --
    
    Add `.` in the end of the error message to be consistent with the rest of the script. Ditto below.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    **[Test build #97620 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97620/testReport)** for PR 22748 at commit [`a9516f0`](https://github.com/apache/spark/commit/a9516f03bb138be09734ef35fd934f41c16bbff5).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh s...

Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22748#discussion_r225867566
  
    --- Diff: bin/docker-image-tool.sh ---
    @@ -44,28 +44,41 @@ function image_ref {
     function build {
       local BUILD_ARGS
       local IMG_PATH
    +  local JARS
     
       if [ ! -f "$SPARK_HOME/RELEASE" ]; then
         # Set image build arguments accordingly if this is a source repo and not a distribution archive.
         IMG_PATH=resource-managers/kubernetes/docker/src/main/dockerfiles
    +    JARS=assembly/target/scala-$SPARK_SCALA_VERSION/jars
         BUILD_ARGS=(
           ${BUILD_PARAMS}
           --build-arg
           img_path=$IMG_PATH
           --build-arg
    -      spark_jars=assembly/target/scala-$SPARK_SCALA_VERSION/jars
    +      spark_jars=$JARS
           --build-arg
           k8s_tests=resource-managers/kubernetes/integration-tests/tests
         )
       else
    -    # Not passed as an argument to docker, but used to validate the Spark directory.
    +    # Not passed as arguments to docker, but used to validate the Spark directory.
         IMG_PATH="kubernetes/dockerfiles"
    +    JARS=jars
         BUILD_ARGS=(${BUILD_PARAMS})
       fi
     
    +  # Verify that the Docker image content directory is present
       if [ ! -d "$IMG_PATH" ]; then
         error "Cannot find docker image. This script must be run from a runnable distribution of Apache Spark."
       fi
    +
    +  # Verify that Spark has actually been built/is a runnable distribution
    +  # i.e. the Spark JARs that the Docker files will place into the image are present
    +  local TOTAL_JARS=$(ls $JARS/spark-* | wc -l)
    +  TOTAL_JARS=$(( $TOTAL_JARS ))
    +  if [ "${TOTAL_JARS}" -eq 0 ]; then
    +    error "Cannot find Spark JARs.  This script assumes that Apache Spark has first been built locally."
    --- End diff --
    
    Fixed


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Merged build finished. Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Rebased onto master, should be ready for merging


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4131/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    ok to test


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    **[Test build #97618 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97618/testReport)** for PR 22748 at commit [`a9516f0`](https://github.com/apache/spark/commit/a9516f03bb138be09734ef35fd934f41c16bbff5).
     * This patch **fails PySpark pip packaging tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Tests that matter passed. Merging to master.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh s...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/22748


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Kubernetes integration test status success
    URL: https://amplab.cs.berkeley.edu/jenkins/job/testing-k8s-prb-make-spark-distribution-unified/4132/



---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Suggested reviewers: @mccheah @liyinan926 @skonto 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Merged build finished. Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Seems like touching only this script doesn't trigger the k8s integration tests? That should probably be fixed somehow...


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    **[Test build #97620 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97620/testReport)** for PR 22748 at commit [`a9516f0`](https://github.com/apache/spark/commit/a9516f03bb138be09734ef35fd934f41c16bbff5).
     * This patch **fails PySpark pip packaging tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Can one of the admins verify this patch?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Kubernetes integration test status success
    URL: https://amplab.cs.berkeley.edu/jenkins/job/testing-k8s-prb-make-spark-distribution-unified/4131/



---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4132/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Can one of the admins verify this patch?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Kubernetes integration test starting
    URL: https://amplab.cs.berkeley.edu/jenkins/job/testing-k8s-prb-make-spark-distribution-unified/4131/



---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Merged build finished. Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97619/
    Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    **[Test build #97619 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97619/testReport)** for PR 22748 at commit [`a9516f0`](https://github.com/apache/spark/commit/a9516f03bb138be09734ef35fd934f41c16bbff5).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Kubernetes integration test starting
    URL: https://amplab.cs.berkeley.edu/jenkins/job/testing-k8s-prb-make-spark-distribution-unified/4132/



---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh s...

Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22748#discussion_r225867655
  
    --- Diff: bin/docker-image-tool.sh ---
    @@ -78,20 +91,38 @@ function build {
       docker build $NOCACHEARG "${BUILD_ARGS[@]}" \
         -t $(image_ref spark) \
         -f "$BASEDOCKERFILE" .
    +  if [ $? -ne 0 ]; then
    +    error "Failed to build base Docker image, please refer to Docker build output for details"
    --- End diff --
    
    Fixed this and other instances thereof


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by rvesse <gi...@git.apache.org>.
Github user rvesse commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    > There seems to be overlapping logic between this PR and #22681
    
    Yes sorry, I was having issues with the script while working on something unrelated and hadn't realised your integration tests were also proposing changes to this.  


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by ifilonenko <gi...@git.apache.org>.
Github user ifilonenko commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    @vanzin I think it is related to having access to trigger the k8s builds (I or @shaneknapp ) can add you if you would like


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Can one of the admins verify this patch?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by mccheah <gi...@git.apache.org>.
Github user mccheah commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Shouldn't the Kubernetes integration tests be triggered regardless of who pushes "ok to test"? The subject of the change should be what matters, not the user.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by ifilonenko <gi...@git.apache.org>.
Github user ifilonenko commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    There seems to be overlapping logic between this PR and https://github.com/apache/spark/pull/22681


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by shaneknapp <gi...@git.apache.org>.
Github user shaneknapp commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    k8s tests are triggered by the subject of the PR.  if the test isn't being triggered (which it appears to be), then it will require a jenkins restart.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh s...

Posted by liyinan926 <gi...@git.apache.org>.
Github user liyinan926 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22748#discussion_r225614967
  
    --- Diff: bin/docker-image-tool.sh ---
    @@ -44,28 +44,41 @@ function image_ref {
     function build {
       local BUILD_ARGS
       local IMG_PATH
    +  local JARS
     
       if [ ! -f "$SPARK_HOME/RELEASE" ]; then
         # Set image build arguments accordingly if this is a source repo and not a distribution archive.
         IMG_PATH=resource-managers/kubernetes/docker/src/main/dockerfiles
    +    JARS=assembly/target/scala-$SPARK_SCALA_VERSION/jars
         BUILD_ARGS=(
           ${BUILD_PARAMS}
           --build-arg
           img_path=$IMG_PATH
           --build-arg
    -      spark_jars=assembly/target/scala-$SPARK_SCALA_VERSION/jars
    +      spark_jars=$JARS
           --build-arg
           k8s_tests=resource-managers/kubernetes/integration-tests/tests
         )
       else
    -    # Not passed as an argument to docker, but used to validate the Spark directory.
    +    # Not passed as arguments to docker, but used to validate the Spark directory.
         IMG_PATH="kubernetes/dockerfiles"
    +    JARS=jars
         BUILD_ARGS=(${BUILD_PARAMS})
       fi
     
    +  # Verify that the Docker image content directory is present
       if [ ! -d "$IMG_PATH" ]; then
         error "Cannot find docker image. This script must be run from a runnable distribution of Apache Spark."
       fi
    +
    +  # Verify that Spark has actually been built/is a runnable distribution
    +  # i.e. the Spark JARs that the Docker files will place into the image are present
    +  local TOTAL_JARS=$(ls $JARS/spark-* | wc -l)
    +  TOTAL_JARS=$(( $TOTAL_JARS ))
    +  if [ "${TOTAL_JARS}" -eq 0 ]; then
    +    error "Cannot find Spark JARs.  This script assumes that Apache Spark has first been built locally."
    --- End diff --
    
    Double white spaces after `JARS.`. Also it's better to say `Apache Spark has first been built locally or it is run from inside a distribution`.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    @vanzin, the test failure was related. don't merge if the tests are failed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #22748: [SPARK-25745][K8S] Improve docker-image-tool.sh script

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22748
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97618/
    Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org