8000 Replace os.path.split with .dirname or .basename where appropriate by foolip · Pull Request #25008 · web-platform-tests/wpt · GitHub
[go: up one dir, main page]

Skip to content

Replace os.path.split with .dirname or .basename where appropriate #25008

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

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

foolip
Copy link
Member
@foolip foolip commented Aug 14, 2020

Most of the changes made by:

git grep -lF os.path.split | xargs sed -i '' 's/os.path.split((.*))[0]/os.path.dirname(\1)/g'

That gets some things wrong, so all changes were vetted and some fixed
or simplified.

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-25008 August 14, 2020 08:38 Inactive
@foolip
Copy link
Member Author
foolip commented Aug 14, 2020

I believe that https://github.com/web-platform-tests/wpt/pull/25008/checks?check_run_id=984077316 can be ignored, these tests even say "Note: this test will only work as expected once per browsing session. Restart browser to re-test".

@stephenmcgruer @jgraham I've seen this kind of stability failure many times, but this is the first time I've spotted it documented in the tests. Should we have some way of marking such tests as needing restart to avoid these failures?

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.

Maybe we shouldn't touch tools/third_party?

@foolip
Copy link
Member Author
foolip commented Aug 14, 2020

Maybe we shouldn't touch tools/third_party?

Oops, I wasn't paying attention to where the changes were.

Most of the changes made by:

> git grep -lF os.path.split | xargs sed -i '' 's/os\.path\.split(\(.*\))\[0\]/os.path.dirname(\1)/g'

That gets some things wrong, so all changes were vetted and some fixed
or simplified.
foolip added a commit to foolip/pywebsocket3 that referenced this pull request Aug 14, 2020
@wpt-pr-bot wpt-pr-bot requested review from < 8000 a data-hovercard-type="user" data-hovercard-url="/users/zqzhang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/zqzhang">zqzhang and removed request for LukeZielinski August 14, 2020 13:29
@foolip
Copy link
Member Author
foolip commented Aug 14, 2020

I've sent most of the tools/third_party changes in html5lib/html5lib-python#508 + GoogleChromeLabs/pywebsocket3#11 and reverted them here.

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.

Looks safe to me

ricea pushed a commit to GoogleChromeLabs/pywebsocket3 that referenced this pull request Aug 14, 2020
@foolip foolip merged commit 0f986ae into m 8000 aster Aug 17, 2020
@foolip foolip deleted the foolip/dirname branch August 17, 2020 07:36
@foolip
Copy link
Member Author
foolip commented Aug 17, 2020

Looking for regressions from this, it seems OK:
https://wpt.fyi/results/?q=seq%28status%3Apass%20status%3A%21pass%29&run_id=657990001&run_id=661940001
https://wpt.fyi/results/?q=seq%28status%3Apass%20status%3A%21pass%29&run_id=633480001&run_id=657990002

@stephenmcgruer this is fewer failures due to flakiness than I remember typically seeing. Might that mean it's more feasible to label the remaining flakiness and make it possible to search excluding flaky tests?

@stephenmcgruer
Copy link
Contributor

@foolip I think you more want is:different rather than seq(status:pass status:!pass) if you're trying to look for all flake:

https://wpt.fyi/results/?diff&filter=ADC&q=is%3Adifferent&run_id=657990001&run_id=661940001
https://wpt.fyi/results/?diff&filter=ADC&q=is%3Adifferent&run_id=633480001&run_id=657990002

Its still not huge (25 vs 50 subtests for Chrome, 10 vs 46 for Firefox), albeit this is only across two runs, but if we're saying flake is rare then it almost feels like a disincentive to add infrastructure around it rather than a reason to do it?

@foolip
Copy link
Member Author
foolip commented Aug 18, 2020

I was looking for regressions and flakes were getting in the way. Filtering to just PASS→!PASS gets rid of the flakes that can't be regressions at least :)

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.

6 participants
0