-
Notifications
You must be signed in to change notification settings - Fork 18
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
[BUGFIX] Pin the same pip version as core st2 #102
Conversation
To clarify: - run:
name: Download dependencies
shell: /bin/bash
command: |
git clone -b master git://github.com/stackstorm-exchange/ci.git ~/ci
~/ci/.circle/dependencies Then,
So, I change the pinned version and install +PIP_DEP="pip==20.0.2"
-sudo pip install -U "pip>=9.0,<9.1" setuptools virtualenv
+sudo pip install -U "${PIP_DEP}" setuptools virtualenv
virtualenv ~/virtualenv
source ~/virtualenv/bin/activate
+# virtualenv is updating pip. Revert back to our pinned version.
+pip install -U "${PIP_DEP}"
+pip --version
+
# Copy over Makefile and install StackStorm runners and register metrics drivers
echo "Installing StackStorm runners and registering metrics drivers"
if [[ -n "${ROOT_DIR}" ]]; then
PACK_REQUIREMENTS_FILE="${ROOT_DIR}/requirements.txt"
PACK_TESTS_REQUIREMENTS_FILE="${ROOT_DIR}/requirements-tests.txt"
echo "Copying Makefile to ${ROOT_DIR}"
cp ~/ci/.circle/Makefile ${ROOT_DIR}
make -C requirements-ci .install-runners |
The |
hmm. Cool. I didn't think of looking up Happily, I don't think that flag is restricted to python3. Plus, looking at the two versions of virtualenv mentioned in this build I can also use |
92acda6
to
e4109eb
Compare
OK. Here are a couple more failing builds: At the end, you see pip complaining:
Looking farther up in the logs you see error messages coming from pip 20.3.3, which is far newer than we have tested with:
And finally, if you look farther up in the log, you see the culprit for the bad pip version where the virtualenv is built:
|
I just added StackStorm-Exchange/stackstorm-acos@3f7dd93 to one of the PRs to see how this PR affects the The warnings from pip 20.3.3 are gone, but something else is still messed up. Hmm. |
💡 Oh. I get it. Here's the error about pipenv needing an older virtualenv:
So, now we need to create handle virtualenv install + create separately for py27 and py3. |
9692e13
to
4c76b5e
Compare
OK. Lowering virtualenv version resolved the pipenv error, but something else is still broken. |
I temporarily added a pyOpenSSL dep fix here. I'm submitting that change in StackStorm/st2#5131 Once we get that working and merged, then this PR should be good to go as well. |
9644298
to
824d3ab
Compare
I dropped python2 support and rebased on master. I think this is ready to merge. |
Core st2 has pip==20.0.2 pinned. Also, virtualenv is building the env with a much newer version of pip now. So, the CI is flapping back and forth between pip-9.0*, pip-20.0*, and pip-20.3* (the latest right now). st2 pinned version is here: https://github.com/StackStorm/st2/blob/v3.3/Makefile#L56
This would be much more complex if we neded to support python2. But we don't, so hooray.
be2dc90
to
a2ea4ae
Compare
rebased on master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
st2 core uses pip 20.0.2. Do the same here. For all other exchange packs, this was updated in: StackStorm-Exchange/ci#102
The pack CI is currently pinning
pip>=9.0,<9.1
in theMakefile
and thedependencies
script, both of which are used for pack CI (it is also pinned in the circleci config for this repo).But, core st2 has
pip==20.0.2
pinned in itsMakefile
, which is also used by thedependencies
script for pack CI.And, to make the pinned versions even more problematic,
virtualenv
is now installing an even newer version ofpip
just before we try to install the st2 requirements, and that newer pip version (20.3) uses the new pip resolver which can't handle st2 requirements. This is the output ofvirtualenv
in a recent test run. Note how pip-9.0.3 gets installed and then virtualenv promptly installs pip-20.3.3.So, the CI is flapping back and forth between pip-9.0*, pip-20.0*, and pip-20.3* which makes it very difficult to debug.
This PR fixes all that by using the same pinned version of pip that st2 has pinned. It also makes sure the correct version of pip is installed after the virtualenv is built but before the st2 requirements get installed.