Skip to content

Commit 45ed76d

Browse files
selMarcelo Vanzin
authored andcommitted
[SPARK-25803][K8S] Fix docker-image-tool.sh -n option
## What changes were proposed in this pull request? docker-image-tool.sh uses getopts in which a colon signifies that an option takes an argument. Since -n does not take an argument it should not have a colon. ## How was this patch tested? Following the reproduction in [JIRA](https://issues.apache.org/jira/browse/SPARK-25803):- 0. Created a custom Dockerfile to use for the spark-r container image. In each of the steps below the path to this Dockerfile is passed with the '-R' option. (spark-r is used here simply as an example, the bug applies to all options) 1. Built container images without '-n'. The [result](https://gist.github.com/sel/59f0911bb1a6a485c2487cf7ca770f9d) is that the '-R' option is honoured and the hello-world image is built for spark-r, as expected. 2. Built container images with '-n' to reproduce the issue The [result](https://gist.github.com/sel/e5cabb9f3bdad5d087349e7fbed75141) is that the '-R' option is ignored and the default container image for spark-r is built 3. Applied the patch and re-built container images with '-n' and did not reproduce the issue The [result](https://gist.github.com/sel/6af14b95012ba8ff267a4fce6e3bd3bf) is that the '-R' option is honoured and the hello-world image is built for spark-r, as expected. Closes #22798 from sel/fix-docker-image-tool-nocache. Authored-by: Steve <[email protected]> Signed-off-by: Marcelo Vanzin <[email protected]> (cherry picked from commit 9b98d91) Signed-off-by: Marcelo Vanzin <[email protected]>
1 parent a20660b commit 45ed76d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/docker-image-tool.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ PYDOCKERFILE=
145145
RDOCKERFILE=
146146
NOCACHEARG=
147147
BUILD_PARAMS=
148-
while getopts f:p:R:mr:t:n:b: option
148+
while getopts f:p:R:mr:t:nb: option
149149
do
150150
case "${option}"
151151
in

0 commit comments

Comments
 (0)