Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-28468][INFRA][2.4] Upgrade pip to fix sphinx install error #25226

Closed
wants to merge 1 commit into from
Closed

[SPARK-28468][INFRA][2.4] Upgrade pip to fix sphinx install error #25226

wants to merge 1 commit into from

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jul 22, 2019

What changes were proposed in this pull request?

Spark 2.4.x should be a LTS version and we should use the release script in branch-2.4 to avoid the previous mistakes. Currently, do-release-docker.sh fails at sphinx installation to Python 2.7 at branch-2.4 only. This PR aims to upgrade pip to handle this.

$ dev/create-release/do-release-docker.sh -d /tmp/spark-2.4.4 -n
...
= Building spark-rm image with tag latest...
Command: docker build -t spark-rm:latest --build-arg UID=501 /Users/dhyun/APACHE/spark-2.4/dev/create-release/spark-rm
Log file: docker-build.log
// Terminated.
$ tail /tmp/spark-2.4.4/docker-build.log
Collecting sphinx
  Downloading https://files.pythonhosted.org/packages/89/1e/64c77163706556b647f99d67b42fced9d39ae6b1b86673965a2cd28037b5/Sphinx-2.1.2.tar.gz (6.3MB)
    Complete output from command python setup.py egg_info:
    ERROR: Sphinx requires at least Python 3.5 to run.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2tylGA/sphinx/
You are using pip version 8.1.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

The following is the short reproducible step.

$ docker build -t spark-rm-test2 --build-arg UID=501 dev/create-release/spark-rm

How was this patch tested?

Manual.

$ docker build -t spark-rm-test2 --build-arg UID=501 dev/create-release/spark-rm

@@ -60,6 +60,7 @@ RUN apt-get clean && apt-get update && $APT_INSTALL gnupg ca-certificates apt-tr
$APT_INSTALL nodejs && \
# Install needed python packages. Use pip for installing packages (for consistency).
$APT_INSTALL libpython2.7-dev libpython3-dev python-pip python3-pip && \
pip install --upgrade pip && hash -r pip && \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hash -r pip is also required. Without that, we will hit the following.

Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28468][INFRA] Update pip to fix sphinx import error [SPARK-28468][INFRA] Upgrade pip to fix sphinx import error Jul 22, 2019
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28468][INFRA] Upgrade pip to fix sphinx import error [SPARK-28468][INFRA][2.4] Upgrade pip to fix sphinx import error Jul 22, 2019
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28468][INFRA][2.4] Upgrade pip to fix sphinx import error [SPARK-28468][INFRA][2.4] Upgrade pip to fix sphinx install error Jul 22, 2019
@dongjoon-hyun
Copy link
Member Author

cc @dbtsai , @srowen , @gatorsmile , @HyukjinKwon

@dongjoon-hyun
Copy link
Member Author

BTW, @gatorsmile . Did you use branch-2.4 branch script or master branch script at 2.4.3 release? I'm wondering if this is a new situation after 2.4.3.

@SparkQA

This comment has been minimized.

@HyukjinKwon
Copy link
Member

retest this please

@dongjoon-hyun
Copy link
Member Author

Thank you for retriggering, @HyukjinKwon .

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

@SparkQA
Copy link

SparkQA commented Jul 22, 2019

Test build #107993 has finished for PR 25226 at commit e4ae98c.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

retest this please

@SparkQA
Copy link

SparkQA commented Jul 22, 2019

Test build #108010 has finished for PR 25226 at commit e4ae98c.

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

Copy link
Member Author

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for review and approval, @HyukjinKwon and @srowen .
Merged to branch-2.4.

dongjoon-hyun added a commit that referenced this pull request Jul 22, 2019
## What changes were proposed in this pull request?

Spark 2.4.x should be a LTS version and we should use the release script in `branch-2.4` to avoid the previous mistakes. Currently, `do-release-docker.sh` fails at `sphinx` installation to `Python 2.7` at `branch-2.4` only. This PR aims to upgrade `pip` to handle this.
```
$ dev/create-release/do-release-docker.sh -d /tmp/spark-2.4.4 -n
...
= Building spark-rm image with tag latest...
Command: docker build -t spark-rm:latest --build-arg UID=501 /Users/dhyun/APACHE/spark-2.4/dev/create-release/spark-rm
Log file: docker-build.log
// Terminated.
```
```
$ tail /tmp/spark-2.4.4/docker-build.log
Collecting sphinx
  Downloading https://files.pythonhosted.org/packages/89/1e/64c77163706556b647f99d67b42fced9d39ae6b1b86673965a2cd28037b5/Sphinx-2.1.2.tar.gz (6.3MB)
    Complete output from command python setup.py egg_info:
    ERROR: Sphinx requires at least Python 3.5 to run.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2tylGA/sphinx/
You are using pip version 8.1.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
```

The following is the short reproducible step.
```
$ docker build -t spark-rm-test2 --build-arg UID=501 dev/create-release/spark-rm
```

## How was this patch tested?

Manual.
```
$ docker build -t spark-rm-test2 --build-arg UID=501 dev/create-release/spark-rm
```

Closes #25226 from dongjoon-hyun/SPARK-28468.

Authored-by: Dongjoon Hyun <dhyun@apple.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
@dongjoon-hyun dongjoon-hyun deleted the SPARK-28468 branch July 22, 2019 17:46
rluta pushed a commit to rluta/spark that referenced this pull request Sep 17, 2019
## What changes were proposed in this pull request?

Spark 2.4.x should be a LTS version and we should use the release script in `branch-2.4` to avoid the previous mistakes. Currently, `do-release-docker.sh` fails at `sphinx` installation to `Python 2.7` at `branch-2.4` only. This PR aims to upgrade `pip` to handle this.
```
$ dev/create-release/do-release-docker.sh -d /tmp/spark-2.4.4 -n
...
= Building spark-rm image with tag latest...
Command: docker build -t spark-rm:latest --build-arg UID=501 /Users/dhyun/APACHE/spark-2.4/dev/create-release/spark-rm
Log file: docker-build.log
// Terminated.
```
```
$ tail /tmp/spark-2.4.4/docker-build.log
Collecting sphinx
  Downloading https://files.pythonhosted.org/packages/89/1e/64c77163706556b647f99d67b42fced9d39ae6b1b86673965a2cd28037b5/Sphinx-2.1.2.tar.gz (6.3MB)
    Complete output from command python setup.py egg_info:
    ERROR: Sphinx requires at least Python 3.5 to run.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2tylGA/sphinx/
You are using pip version 8.1.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
```

The following is the short reproducible step.
```
$ docker build -t spark-rm-test2 --build-arg UID=501 dev/create-release/spark-rm
```

## How was this patch tested?

Manual.
```
$ docker build -t spark-rm-test2 --build-arg UID=501 dev/create-release/spark-rm
```

Closes apache#25226 from dongjoon-hyun/SPARK-28468.

Authored-by: Dongjoon Hyun <dhyun@apple.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
kai-chi pushed a commit to kai-chi/spark that referenced this pull request Sep 26, 2019
## What changes were proposed in this pull request?

Spark 2.4.x should be a LTS version and we should use the release script in `branch-2.4` to avoid the previous mistakes. Currently, `do-release-docker.sh` fails at `sphinx` installation to `Python 2.7` at `branch-2.4` only. This PR aims to upgrade `pip` to handle this.
```
$ dev/create-release/do-release-docker.sh -d /tmp/spark-2.4.4 -n
...
= Building spark-rm image with tag latest...
Command: docker build -t spark-rm:latest --build-arg UID=501 /Users/dhyun/APACHE/spark-2.4/dev/create-release/spark-rm
Log file: docker-build.log
// Terminated.
```
```
$ tail /tmp/spark-2.4.4/docker-build.log
Collecting sphinx
  Downloading https://files.pythonhosted.org/packages/89/1e/64c77163706556b647f99d67b42fced9d39ae6b1b86673965a2cd28037b5/Sphinx-2.1.2.tar.gz (6.3MB)
    Complete output from command python setup.py egg_info:
    ERROR: Sphinx requires at least Python 3.5 to run.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2tylGA/sphinx/
You are using pip version 8.1.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
```

The following is the short reproducible step.
```
$ docker build -t spark-rm-test2 --build-arg UID=501 dev/create-release/spark-rm
```

## How was this patch tested?

Manual.
```
$ docker build -t spark-rm-test2 --build-arg UID=501 dev/create-release/spark-rm
```

Closes apache#25226 from dongjoon-hyun/SPARK-28468.

Authored-by: Dongjoon Hyun <dhyun@apple.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants