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

Upgrade pip to 20.3.3 and virtualenv to 20.4.0 #98

Merged
merged 22 commits into from
Mar 16, 2021
Merged

Conversation

amanda11
Copy link
Contributor

@amanda11 amanda11 commented Jan 25, 2021

Using pip 20.3.3 and legacy resolver

@amanda11 amanda11 marked this pull request as draft January 25, 2021 23:36
@arm4b arm4b mentioned this pull request Jan 30, 2021
@amanda11 amanda11 changed the title [WIP] Upgrade pip to 20.3.4 [WIP] Upgrade pip to 20.3.3 and virtualenv to 20.4.0 Feb 1, 2021
@arm4b
Copy link
Member

arm4b commented Feb 3, 2021

You can check the https://hub.docker.com/repository/registry-1.docker.io/stackstorm/buildpack/builds/f12894d9-f84b-4842-a2c5-7fea9e8abd7e build at Docker Hub.

Copy-paste error log:

Step 4/5 : RUN yum -y install python-devel && wget -qO - https://bootstrap.pypa.io/get-pip.py | python && pip install --upgrade "pip==20.3.3" && pip install setuptools virtualenv && rm -rf /root/.cache
---> Running in 55c806a1803a
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
* base: mirror.centos.org
* extras: mirror.centos.org
* updates: mirror.centos.org
Resolving Dependencies
--> Running transaction check
---> Package python-devel.x86_64 0:2.7.5-90.el7 will be installed
--> Processing Dependency: python(x86-64) = 2.7.5-90.el7 for package: python-devel-2.7.5-90.el7.x86_64
--> Processing Dependency: python2-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64
--> Processing Dependency: python-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64
--> Running transaction check
---> Package python.x86_64 0:2.7.5-89.el7 will be updated
---> Package python.x86_64 0:2.7.5-90.el7 will be an update
--> Processing Dependency: python-libs(x86-64) = 2.7.5-90.el7 for package: python-2.7.5-90.el7.x86_64
---> Package python-rpm-macros.noarch 0:3-34.el7 will be installed
---> Package python2-rpm-macros.noarch 0:3-34.el7 will be installed
--> Running transaction check
---> Package python-libs.x86_64 0:2.7.5-89.el7 will be updated
---> Package python-libs.x86_64 0:2.7.5-90.el7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
python-devel x86_64 2.7.5-90.el7 updates 399 k
Installing for dependencies:
python-rpm-macros noarch 3-34.el7 base 9.1 k
python2-rpm-macros noarch 3-34.el7 base 8.1 k
Updating for dependencies:
python x86_64 2.7.5-90.el7 updates 96 k
python-libs x86_64 2.7.5-90.el7 updates 5.6 M
Transaction Summary
================================================================================
Install 1 Package (+2 Dependent packages)
Upgrade ( 2 Dependent packages)
Total download size: 6.1 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
--------------------------------------------------------------------------------
Total 13 MB/s | 6.1 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : python-libs-2.7.5-90.el7.x86_64 1/7
Updating : python-2.7.5-90.el7.x86_64 2/7
Installing : python-rpm-macros-3-34.el7.noarch 3/7
Installing : python2-rpm-macros-3-34.el7.noarch 4/7
Installing : python-devel-2.7.5-90.el7.x86_64 5/7
Cleanup : python-2.7.5-89.el7.x86_64 6/7
Cleanup : python-libs-2.7.5-89.el7.x86_64 7/7
Verifying : python2-rpm-macros-3-34.el7.noarch 1/7
Verifying : python-libs-2.7.5-90.el7.x86_64 2/7
Verifying : python-devel-2.7.5-90.el7.x86_64 3/7
Verifying : python-2.7.5-90.el7.x86_64 4/7
Verifying : python-rpm-macros-3-34.el7.noarch 5/7
Verifying : python-libs-2.7.5-89.el7.x86_64 6/7
Verifying : python-2.7.5-89.el7.x86_64 7/7
Installed:
python-devel.x86_64 0:2.7.5-90.el7
Dependency Installed:
python-rpm-macros.noarch 0:3-34.el7 python2-rpm-macros.noarch 0:3-34.el7
Dependency Updated:
python.x86_64 0:2.7.5-90.el7 python-libs.x86_64 0:2.7.5-90.el7
Complete!
�[91mTraceback (most recent call last):
�[0m
�[91m File "<stdin>", line 24244, in <module>
�[0m
�[91m File "<stdin>", line 199, in main
�[0m
�[91m File "<stdin>", line 82, in bootstrap
�[0m
�[91m File "�[0m
�[91m/tmp/tmpbsXUAQ/pip.zip/pip/_internal/cli/main.py�[0m
�[91m", line �[0m
�[91m60�[0m
�[91m
�[0m
�[91m �[0m
�[91msys.stderr.write(f"ERROR: {exc}")
�[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m �[0m
�[91m ^
�[0m
�[91mSyntaxError: invalid syntax
�[0m
Removing intermediate container 55c806a1803a
The command '/bin/sh -c yum -y install python-devel && wget -qO - https://bootstrap.pypa.io/get-pip.py | python && pip install --upgrade "pip==20.3.3" && pip install setuptools virtualenv && rm -rf /root/.cache' returned a non-zero code: 1

@blag blag marked this pull request as ready for review February 4, 2021 00:29
@blag blag requested a review from arm4b February 4, 2021 01:05
@amanda11 amanda11 marked this pull request as draft February 4, 2021 10:02
@amanda11
Copy link
Contributor Author

amanda11 commented Feb 4, 2021

Putting back to draft whilst we fix why still getting complaints about no-site-packages. Also may want to use pip 20.3.3 as it matches the version used by virtualenv.

buildpack/centos7/Dockerfile Outdated Show resolved Hide resolved
@amanda11 amanda11 marked this pull request as draft March 11, 2021 14:56
@amanda11 amanda11 marked this pull request as ready for review March 11, 2021 16:23
Copy link
Member

@cognifloyd cognifloyd left a comment

Choose a reason for hiding this comment

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

The buildpack images were removed in #101 (614b461 and c345407) but they were reintroduced as empty files in this merge commit: 973b39a So, please delete:

  • buildpack/*/Dockerfile
  • packagingbuild/Dockerfile.debian
  • packagingbuild/Dockerfile.template

@amanda11
Copy link
Contributor Author

The buildpack images were removed in #101 (614b461 and c345407) but they were reintroduced as empty files in this merge commit: 973b39a So, please delete:

  • buildpack/*/Dockerfile

  • packagingbuild/Dockerfile.debian

  • packagingbuild/Dockerfile.template

Thanks for picking that up - will fix

RUN apt-get -y install \
python-virtualenv python-setuptools python-mock && \
apt-get clean && \
git clone --branch stackstorm_patched_use_custom_pip https://github.com/StackStorm/dh-virtualenv.git /tmp/dh-virtualenv && \
git clone --branch rm_site_packages_upgrade_pip https://github.com/StackStorm/dh-virtualenv.git /tmp/dh-virtualenv && \
Copy link
Member

@Kami Kami Mar 12, 2021

Choose a reason for hiding this comment

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

Per my comment on Slack - please open PR with your changes against stackstorm_patched branch in dh-virtualenv repo and let's just use stackstorm_patched branch.

Copy link
Member

Choose a reason for hiding this comment

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

I assume you will update this line here when the other PR is merged, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Kami Yes - updated now - to use stackstorm_patched.

# This line just busts Docker's cache so it re-runs the next line
# The GitHub API will return different results when the branch HEAD changes
# See https://stackoverflow.com/a/39278224
# ADD https://api.github.com/repos/StackStorm/dh-virtualenv/git/refs/heads/rm_site_packages_upgrade_pip version.json
Copy link
Member

Choose a reason for hiding this comment

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

One option would also to be pin to check out a specific commit revision in the git clone / checkout line

Copy link
Member

@Kami Kami left a comment

Choose a reason for hiding this comment

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

I approved this PR, but let's please also make the dh-virtualenv change mentioned in the comment.

@cognifloyd
Copy link
Member

The buildpack images were removed in #101 (614b461 and c345407) but they were reintroduced as empty files in this merge commit: 973b39a So, please delete:

  • buildpack/*/Dockerfile
  • packagingbuild/Dockerfile.debian
  • packagingbuild/Dockerfile.template

Thanks for picking that up - will fix

You got rid of the buildpack empty files. 👍
Could you also remove the empty packagingbuild files?

@amanda11
Copy link
Contributor Author

The buildpack images were removed in #101 (614b461 and c345407) but they were reintroduced as empty files in this merge commit: 973b39a So, please delete:

  • buildpack/*/Dockerfile
  • packagingbuild/Dockerfile.debian
  • packagingbuild/Dockerfile.template

Thanks for picking that up - will fix

You got rid of the buildpack empty files.
Could you also remove the empty packagingbuild files?

Oops - missed them. Thanks - hopefully got them all now!

@amanda11
Copy link
Contributor Author

TODO: Update the PR to use stackstorm-patched branch after the dh-virtualenv PR has merged changes into stackstorm-patched branch. Will push up that change after other PR merged....

@amanda11 amanda11 marked this pull request as draft March 12, 2021 17:40
@amanda11 amanda11 marked this pull request as ready for review March 16, 2021 09:27
@amanda11 amanda11 marked this pull request as draft March 16, 2021 09:28
@amanda11 amanda11 marked this pull request as ready for review March 16, 2021 15:01
@amanda11
Copy link
Contributor Author

@armab Would you be able to re-review, as I believe your review comments have now been addressed. Thanks.

Copy link
Member

@Kami Kami left a comment

Choose a reason for hiding this comment

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

LGTM 👍

#
# We use our dh-virtualenv version, since it fixes shebangd lines rewrites.
# The shebangd rewrites are in master branch, but that requires dependency
# on debhelper 12.
Copy link
Member

Choose a reason for hiding this comment

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

I think in the future it's OK to switch to debhelper 12.

From what I see we're on 10 right now: https://github.com/StackStorm/st2-packages/blob/master/packages/st2/debian/compat

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I tried on bionic in our images, the latest debhelper it could download was 11. I don't think 12 is in the bionic repos.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense, good to know!
So probably 10 for Ubuntu Xenial then.

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

Looks good 👍

Thanks, everyone!

@amanda11 amanda11 merged commit baf9e8f into master Mar 16, 2021
@amanda11 amanda11 deleted the upgrade_pip branch March 16, 2021 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants