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

[DO NOT SUBMIT] Reproduce MacOS + Py3.8 mozinstall failure #24813

Closed
wants to merge 6 commits into from

Conversation

stephenmcgruer
Copy link
Contributor

No description provided.

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 30, 2020 12:22 Inactive
@stephenmcgruer
Copy link
Contributor Author

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 30, 2020 18:18 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 30, 2020 18:34 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 30, 2020 19:15 Inactive
@stephenmcgruer stephenmcgruer marked this pull request as ready for review July 30, 2020 20:10
@stephenmcgruer stephenmcgruer marked this pull request as draft July 30, 2020 20:11
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 30, 2020 21:00 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 30, 2020 21:22 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 30, 2020 21:55 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 30, 2020 22:49 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 30, 2020 23:24 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 30, 2020 23:56 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 31, 2020 00:27 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 31, 2020 00:50 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 31, 2020 01:18 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 31, 2020 01:26 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24813 July 31, 2020 02:00 Inactive
@stephenmcgruer
Copy link
Contributor Author

stephenmcgruer commented Jul 31, 2020

At this point I'm fairly confident that this is some very, very strange issue where we seem to somehow be running old mozinstall code, even as the filesystem tells us new code is there (seriously, https://dev.azure.com/web-platform-tests/b14026b4-9423-4454-858f-bf76cf6d1faa/_apis/build/builds/51979/logs/213 is a fun read... an error thrown in a file that when later cat'd has different content).

I have been digging in on-and-off via runs on the bots (oh, to own a mac device...), will summarize my findings so far tomorrow.

EDIT: But a note for myself for tomorrow - in https://dev.azure.com/web-platform-tests/b14026b4-9423-4454-858f-bf76cf6d1faa/_apis/build/builds/51986/logs/206 it is the old code in _venv3 post-test !!!

@Hexcles
Copy link
Member

Hexcles commented Jul 31, 2020

I've gone down the rabbit hole and found the root cause.

First of all, some of tools/wpt/tests are integration tests in the sense that they invoke wpt.main directly, e.g.

wpt.main(argv=["install", "firefox", "browser", "--channel=nightly"])

(Some other tests create venvs themselves, e.g. test_run.py.)

wpt.main will then set up virtualenv itself:

venv = setup_virtualenv(main_args.venv, main_args.skip_venv_setup, props)

This means that only the test cases use the dependencies installed by tox; everything inside wpt.main uses _venv* instead.

Now to the root: we manage _venv* ourselves, using a special flag when installing dependencies:

wpt/tools/wpt/virtualenv.py

Lines 128 to 132 in bd98c68

# `--prefer-binary` guards against race conditions when installation
# occurs while packages are in the process of being published.
call(
self.pip_path, "install", "--prefer-binary", "-r", requirements_path
)

The newest release of mozinstall (2.0.0) unfortunately does not have binary wheels: https://pypi.org/project/mozInstall/2.0.0/#files, but the previous version does https://pypi.org/project/mozInstall/1.16.0/#files

Finally, the install command uses the install field in commands.json which does not pin the version of mozinstall

"install": [
"mozinstall"

unlike in tools/wptrunner/requirements_firefox.txt.

Therefore, when you run wpt run, requirements_firefox.txt will be used and everything works, including wpt install from then on (since the dependency is satisfied); but if you run wpt install on a fresh checkout, pip install --prefer-binary mozinstall will give you the broken 1.16.0.

@Hexcles
Copy link
Member

Hexcles commented Jul 31, 2020

@jgraham has published the wheel for mozinstall 2.0.0. Let's try again now.

@Hexcles
Copy link
Member

Hexcles commented Jul 31, 2020

The tests in question indeed pass now. Filed #24829 to keep track of the venv management issue.

@Hexcles Hexcles closed this Jul 31, 2020
@stephenmcgruer stephenmcgruer deleted the smcgruer/mozinstall branch August 17, 2020 13:49
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.

None yet

4 participants