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

[Azure Pipelines] Use Python 3.8.x for Edge test-suite runs #24952

Merged
merged 9 commits into from Nov 23, 2020

Conversation

stephenmcgruer
Copy link
Contributor

@stephenmcgruer stephenmcgruer commented Aug 11, 2020

See the RFC: web-platform-tests/rfcs#65

This also affects infrastructure/ tests: Windows 10, but that job is currently only manually triggered and is basically unused.

@stephenmcgruer
Copy link
Contributor Author

cc @ziransun

https://dev.azure.com/web-platform-tests/wpt/_build/results?buildId=52438&view=results should be an Edge Dev run with this commit.

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 August 11, 2020 13:41 Inactive
.azure-pipelines.yml Outdated Show resolved Hide resolved
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 August 11, 2020 19:02 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 August 11, 2020 19:53 Inactive
@stephenmcgruer
Copy link
Contributor Author

The Edge run finished but there was an error (I suspect py3-caused) that resulted in it getting no 'revision' tag, which means wpt.fyi won't process it. Unfortunately such errors are deliberately swallowed. I've uploaded a patch that will hopefully log the error, and set off another run - https://dev.azure.com/web-platform-tests/wpt/_build/results?buildId=52472&view=results

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 August 12, 2020 11:35 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 August 12, 2020 12:40 Inactive
@stephenmcgruer
Copy link
Contributor Author

Yep, vcs.py grabs the output of git rev-parse --show-cdup via subprocess.check_output, then compares it to "\n", which fails since the actual output is b"\n". I don't understand yet why this appears to work on Linux on Py3 (given our previous success wpt.fyi uploads), but for now I'm going to just stick a fix in here and trigger another Edge Dev run: https://dev.azure.com/web-platform-tests/wpt/_build/results?buildId=52525&view=results

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 August 12, 2020 12:57 Inactive
@stephenmcgruer
Copy link
Contributor Author

I don't understand yet why this appears to work on Linux on Py3 (given our previous success wpt.fyi uploads)

https://community-tc.services.mozilla.com/tasks/f0VA2hcISQClpnai1ahO-w/runs/0/logs/live/https%3A%2F%2Fcommunity-tc.services.mozilla.com%2Fapi%2Fqueue%2Fv1%2Ftask%2Ff0VA2hcISQClpnai1ahO-w%2Fruns%2F0%2Fartifacts%2Fpublic%2Flogs%2Flive.log appears to confirm that it shouldn't, but yet we've definitely had successful uploads from Linux+Py3 in the past. Once that run is done I'll pull down both the artifacts for it (to see the run_info) and look at the wpt.fyi logs (to see if and how it passes the processor).

@stephenmcgruer
Copy link
Contributor Author

Moving back to Windows, the latest Edge Dev Py 3.8.5 run fails at the end with:

Traceback (most recent call last):
  File "D:\a\1\s\_venv3\Lib\site-packages\mozlog\structuredlog.py", line 274, in _handle_log
    handler(data)
  File "D:\a\1\s\_venv3\Lib\site-packages\mozlog\handlers\base.py", line 74, in __call__
    formatted = self.formatter(data)
  File "D:\a\1\s\_venv3\Lib\site-packages\mozlog\handlers\base.py", line 42, in __call__
    return self.inner(item)
  File "D:\a\1\s\_venv3\Lib\site-packages\mozlog\reader.py", line 74, in __call__
    return handler(data)
  File "D:\a\1\s\tools\wptrunner\wptrunner\formatters\wptreport.py", line 73, in suite_end
    return json.dumps(self.results) + "\n"
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\json\__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\json\encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\json\encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "C:\hostedtoolcache\windows\Python\3.8.5\x64\lib\json\encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type bytes is not JSON serializable

So there are some bytes somewhere in self.results I guess.

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 August 12, 2020 16:19 Inactive
@stephenmcgruer
Copy link
Contributor Author

stephenmcgruer commented Aug 12, 2020

Success, we have Py3.8.5 + Edge Dev results! https://wpt.fyi/results/?run_id=640430002

https://wpt.fyi/results/?q=is%3Adifferent&run_id=626930002&run_id=640430002 is the diff to the nearest run (2df9cdd has two commits that aren't in the RHS, but should be minor). FYI @ziransun .

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 September 8, 2020 14:09 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 September 12, 2020 11:38 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 September 12, 2020 11:48 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 October 1, 2020 12:22 Inactive
@stephenmcgruer
Copy link
Contributor Author

Doing another Edge run is blocked on #25923

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 October 2, 2020 15:31 Inactive
@stephenmcgruer
Copy link
Contributor Author

I have pushed e2af840 to triggers/edge_dev. The parent commit is c960a24, aka https://wpt.fyi/results/?run_id=714260003

Will update with a wpt.fyi diff link once the run is done.

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 November 9, 2020 15:32 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-24952 November 9, 2020 18:23 Inactive
@stephenmcgruer
Copy link
Contributor Author

This is looking good! I've successfully run two runs, the second of which had to uninstall and reinstall py3.8 and did so fine. I think we're in a good place to turn this into a CL that we could land once we wanted to go to Py3.8 (e.g. by getting rid of most of the debug logging, etc, will do that today).

Thanks @mustjab for your work here - very much appreciated!

Copy link
Member

@Hexcles Hexcles left a comment

Choose a reason for hiding this comment

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

Rubber-stamp LGTM

I don't know much about Powershell but it seems like you've worked with an expert on this :)

@stephenmcgruer stephenmcgruer merged commit 79c4657 into master Nov 23, 2020
@stephenmcgruer stephenmcgruer deleted the smcgruer/windows-py3-8 branch November 23, 2020 14:28
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

7 participants