Skip to content

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

Merged
foolip merged 1 commit intomasterfrom
foolip/dirname
Aug 17, 2020
Merged

Replace os.path.split with .dirname or .basename where appropriate#25008
foolip merged 1 commit intomasterfrom
foolip/dirname

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 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 master 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