Update our copy of the in-tree virtualenv to 16.0.0

REOPENED
Unassigned

Status

defect
REOPENED
Last year
8 months ago

People

(Reporter: ahal, Unassigned)

Tracking

3 Branch

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

This will upgrade us from pip 9.0.3 -> 10.0.1 which will start building wheels when installing from local paths instead of running `setup.py install`.

There aren't any concrete reasons to do this upgrade now, but I was investigating whether the upgrade would fix a bug, so have the patch ready and it looks green on try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5be1f76244fa324b6defec842c48bd557189e591
Comment on attachment 8980249 [details]
Bug 1464038 - Upgrade vendored copy of virtualenv to version 16.0.0,

https://reviewboard.mozilla.org/r/246414/#review252512
Attachment #8980249 - Flags: review?(dave.hunt) → review+
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fdf92ddfbf86
Upgrade vendored copy of virtualenv to version 16.0.0, r=davehunt
https://hg.mozilla.org/mozilla-central/rev/fdf92ddfbf86
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Backed out changeset fdf92ddfbf86 (bug 1464038) for causing nightly bustages after virtualenv upgrade to 16.0.0

Backout: https://hg.mozilla.org/mozilla-central/rev/1bdf8e7d1cfe6d8b9bfa891f43473345210ee281

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&revision=0df854d34c01bafb3c88d595f8464ed381b95d03&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=success&selectedJob=180152207

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=180156551&repo=mozilla-central&lineNumber=194

[task 2018-05-25T02:47:21.305Z] New python executable in /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/_virtualenvs/init/bin/python2.7
[task 2018-05-25T02:47:21.305Z] Also creating executable in /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/_virtualenvs/init/bin/python
[task 2018-05-25T02:47:22.966Z] Installing setuptools, pip, wheel...done.
[task 2018-05-25T02:47:24.008Z] running build_ext
[task 2018-05-25T02:47:24.008Z] building 'psutil._psutil_linux' extension
[task 2018-05-25T02:47:24.008Z] creating build
[task 2018-05-25T02:47:24.008Z] creating build/temp.linux-x86_64-2.7
[task 2018-05-25T02:47:24.008Z] creating build/temp.linux-x86_64-2.7/psutil
[task 2018-05-25T02:47:24.008Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
[task 2018-05-25T02:47:24.008Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
[task 2018-05-25T02:47:24.008Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
[task 2018-05-25T02:47:24.008Z] creating build/lib.linux-x86_64-2.7
[task 2018-05-25T02:47:24.008Z] creating build/lib.linux-x86_64-2.7/psutil
[task 2018-05-25T02:47:24.008Z] x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/psutil/_psutil_common.o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o -o build/lib.linux-x86_64-2.7/psutil/_psutil_linux.so
[task 2018-05-25T02:47:24.008Z] building 'psutil._psutil_posix' extension
[task 2018-05-25T02:47:24.008Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
[task 2018-05-25T02:47:24.008Z] x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
[task 2018-05-25T02:47:24.008Z] x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/psutil/_psutil_common.o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o -o build/lib.linux-x86_64-2.7/psutil/_psutil_posix.so
[task 2018-05-25T02:47:24.008Z] copying build/lib.linux-x86_64-2.7/psutil/_psutil_linux.so -> psutil
[task 2018-05-25T02:47:24.008Z] copying build/lib.linux-x86_64-2.7/psutil/_psutil_posix.so -> psutil
[task 2018-05-25T02:47:24.008Z] 
[task 2018-05-25T02:47:24.008Z] Error processing command. Ignoring because optional. (optional:packages.txt:comm/build/virtualenv_packages.txt)
[task 2018-05-25T02:47:24.212Z] Traceback (most recent call last):
[task 2018-05-25T02:47:24.212Z]   File "build/upload_generated_sources.py", line 161, in <module>
[task 2018-05-25T02:47:24.212Z]     sys.exit(main(sys.argv[1:]))
[task 2018-05-25T02:47:24.212Z]   File "build/upload_generated_sources.py", line 152, in main
[task 2018-05-25T02:47:24.212Z]     config.virtualenv_manager.install_pip_package('boto3==1.4.4')
[task 2018-05-25T02:47:24.212Z]   File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/virtualenv.py", line 476, in install_pip_package
[task 2018-05-25T02:47:24.212Z]     from pip.req import InstallRequirement
[task 2018-05-25T02:47:24.212Z]   File "/builds/worker/checkouts/gecko/build/mach_bootstrap.py", line 365, in __call__
[task 2018-05-25T02:47:24.212Z]     module = self._original_import(name, globals, locals, fromlist, level)
[task 2018-05-25T02:47:24.212Z] ImportError: No module named req
Status: RESOLVED → REOPENED
Flags: needinfo?(ahal)
Resolution: FIXED → ---
Target Milestone: mozilla62 → ---
Aryx pinged me earlier to ask about nightlies sanity as, potentially, a change in this bug broke the "upload-generated-sources" tasks in the graphs. 

Did a bit of digging and the tasks failing are cross-platform (e.g. the linux one is here[1] with the logs here[2]). 
The error seems to be:

[task 2018-05-25T02:08:09.631Z] Traceback (most recent call last):
[task 2018-05-25T02:08:09.631Z]   File "build/upload_generated_sources.py", line 161, in <module>
[task 2018-05-25T02:08:09.631Z]     sys.exit(main(sys.argv[1:]))
[task 2018-05-25T02:08:09.631Z]   File "build/upload_generated_sources.py", line 152, in main
[task 2018-05-25T02:08:09.631Z]     config.virtualenv_manager.install_pip_package('boto3==1.4.4')
[task 2018-05-25T02:08:09.631Z]   File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/virtualenv.py", line 476, in install_pip_package
[task 2018-05-25T02:08:09.631Z]     from pip.req import InstallRequirement
[task 2018-05-25T02:08:09.631Z]   File "/builds/worker/checkouts/gecko/build/mach_bootstrap.py", line 365, in __call__
[task 2018-05-25T02:08:09.631Z]     module = self._original_import(name, globals, locals, fromlist, level)
[task 2018-05-25T02:08:09.632Z] ImportError: No module named req

which indeed looks somehow related if this patch is the only one related to python changes in our infra in the past 24-36h. 
In https://hg.mozilla.org/mozilla-central/rev/1bdf8e7d1cfe6d8b9bfa891f43473345210ee281 (patch from this bug) it seems like we're updating the virtualenv from  15.2.0 to 16.0.0. 

Judging by the release notes[3] it sounds like pip was upgradede from 9.0.3 to 10.0.1 along other vendor updates and drop support for python 2.6. AFAIK, the pip upgrade from 9.0.3 to 10.0.1 is quite large (release notes confirm[4]) so I'm leaning towards a culprit somewhere around that upgrade. 

Digging a bit further the error itself, I found other related answers/questions on Stackoverflow, out of which this [5] one is the most representative. 

I'm not 100% yet, but I strongly suspect our error is related to the upgrade, hence a backout of this patch + retrigger nightlies should not harm.

[1]: https://tools.taskcluster.net/groups/V7A_FK3ARVWz_rqLH-zoog
[2]: https://taskcluster-artifacts.net/OsDfT0ZpSEaYrm6NKbx2Lw/0/public/logs/live_backing.log
[3]: https://virtualenv.pypa.io/en/stable/changes/#id1
[4]: https://pip.pypa.io/en/stable/news/
[5]: https://stackoverflow.com/questions/25192794/no-module-named-pip-req
Bummer, thanks for the investigation Mihai.

Like I mentioned in comment 0, there isn't any particular need to do this upgrade at this time. While I'm sure we'll want to prioritize this eventually, I don't have the bandwidth to look into this now. So unassigning myself for the time being. If anyone wants to take over please feel free.
Assignee: ahal → nobody
Flags: needinfo?(ahal)
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.