Skip to content

Conversation

@jooseong
Copy link

What changes were proposed in this pull request?

This change initializes BUILD_ARGS to an empty array when $SPARK_HOME/RELEASE exists.

In function build, "local BUILD_ARGS" effectively creates an array of one element where the first and only element is an empty string, so "${BUILD_ARGS[@]}" expands to "" and passes an extra argument to docker.

Setting BUILD_ARGS to an empty array makes "${BUILD_ARGS[@]}" expand to nothing.

How was this patch tested?

Manually tested.

$ cat RELEASE
Spark 2.3.0 (git revision a0d7949) built for Hadoop 2.7.3
Build flags: -Phadoop-2.7 -Phive -Phive-thriftserver -Pkafka-0-8 -Pmesos -Pyarn -Pkubernetes -Pflume -Psparkr -DzincPort=3036
$ ./bin/docker-image-tool.sh -m t testing build
Sending build context to Docker daemon 256.4MB
...

@vanzin

@felixcheung
Copy link
Member

could you add [K8s] into PR title

@felixcheung
Copy link
Member

Jenkins, ok to test

@felixcheung
Copy link
Member

@foxish

@SparkQA
Copy link

SparkQA commented Mar 11, 2018

Test build #88157 has finished for PR 20791 at commit 096e992.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@jooseong jooseong changed the title [SPARK-23618][BUILD] Initialize BUILD_ARGS in docker-image-tool.sh [SPARK-23618][K8s][BUILD] Initialize BUILD_ARGS in docker-image-tool.sh Mar 11, 2018
@jooseong
Copy link
Author

Added [K8s] into the PR title. Thanks for the review.

@foxish
Copy link
Contributor

foxish commented Mar 11, 2018

LGTM! Thanks @jooseong.

@foxish
Copy link
Contributor

foxish commented Mar 12, 2018

Merged into master. Thanks!

@asfgit asfgit closed this in d5b41ae Mar 12, 2018
@felixcheung
Copy link
Member

felixcheung commented Mar 14, 2018

Hi @jooseong do you have a ASF JIRA user account? We want to attribute this fix to you

@jooseong
Copy link
Author

Hi @felixcheung my ASF JIRA user account is also jooseong. Thanks for following up on this.

mstewart141 pushed a commit to mstewart141/spark that referenced this pull request Mar 24, 2018
## What changes were proposed in this pull request?

This change initializes BUILD_ARGS to an empty array when $SPARK_HOME/RELEASE exists.

In function build, "local BUILD_ARGS" effectively creates an array of one element where the first and only element is an empty string, so "${BUILD_ARGS[]}" expands to "" and passes an extra argument to docker.

Setting BUILD_ARGS to an empty array makes "${BUILD_ARGS[]}" expand to nothing.

## How was this patch tested?

Manually tested.

$ cat RELEASE
Spark 2.3.0 (git revision a0d7949) built for Hadoop 2.7.3
Build flags: -Phadoop-2.7 -Phive -Phive-thriftserver -Pkafka-0-8 -Pmesos -Pyarn -Pkubernetes -Pflume -Psparkr -DzincPort=3036
$ ./bin/docker-image-tool.sh -m t testing build
Sending build context to Docker daemon  256.4MB
...

vanzin

Author: Jooseong Kim <[email protected]>

Closes apache#20791 from jooseong/SPARK-23618.
markhamstra pushed a commit to markhamstra/spark that referenced this pull request Jun 13, 2018
## What changes were proposed in this pull request?

This change initializes BUILD_ARGS to an empty array when $SPARK_HOME/RELEASE exists.

In function build, "local BUILD_ARGS" effectively creates an array of one element where the first and only element is an empty string, so "${BUILD_ARGS[]}" expands to "" and passes an extra argument to docker.

Setting BUILD_ARGS to an empty array makes "${BUILD_ARGS[]}" expand to nothing.

## How was this patch tested?

Manually tested.

$ cat RELEASE
Spark 2.3.0 (git revision a0d7949) built for Hadoop 2.7.3
Build flags: -Phadoop-2.7 -Phive -Phive-thriftserver -Pkafka-0-8 -Pmesos -Pyarn -Pkubernetes -Pflume -Psparkr -DzincPort=3036
$ ./bin/docker-image-tool.sh -m t testing build
Sending build context to Docker daemon  256.4MB
...

vanzin

Author: Jooseong Kim <[email protected]>

Closes apache#20791 from jooseong/SPARK-23618.
@phatak-dev
Copy link
Contributor

This fix is not showing up in 2.3.1 downloadable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants