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 <rvesse@...>
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-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to