Closed Bug 1744249 Opened 2 years ago Closed 2 years ago

[wdspec] Several tests fail to run due to wd_server_config.json not found

Categories

(Testing :: geckodriver, defect, P2)

defect

Tracking

(firefox-esr91 wontfix, firefox95 wontfix, firefox96 fixed, firefox97 fixed)

RESOLVED FIXED
97 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox95 --- wontfix
firefox96 --- fixed
firefox97 --- fixed

People

(Reporter: david.burns, Assigned: whimboo)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

When working on bug 1700093 it was noticed that the collections tests are not being run due to error in wpt. See https://treeherder.mozilla.org/logviewer?job_id=360070977&repo=try&lineNumber=25410-25416

Example error in case tc loses the logs

 1:12.37 INFO STDOUT: _______________________________________________________________________________ ERROR at setup of test_shadow_root _______________________________________________________________________________
 1:12.37 INFO STDOUT:     @pytest.fixture
 1:12.37 INFO STDOUT:     def server_config():
 1:12.37 INFO STDOUT: >       with open(os.environ.get("WD_SERVER_CONFIG_FILE"), "r") as f:
 1:12.37 INFO STDOUT: E       FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/hw/_lj4mq2j1p9__s43mgfjt9j40000gn/T/pytest-j7ptg6w_/wd_server_config.json'
 1:12.37 INFO STDOUT: testing/web-platform/tests/webdriver/tests/support/fixtures.py
 1:12.37 INFO STDOUT: :64: FileNotFoundError
 1:12.37 INFO STDOUT: 

Note that there are way more tests that are currently marked as expected ERROR and it looks like it's mainly the same problem:
https://searchfox.org/mozilla-central/search?q=ERROR&path=meta%2Fwebdriver%2F

And that doesn't seem to be an issue with Firefox only. As wpt.fyi shows all the browsers are affected.

Running a git bisect ended with the following result:

✦2 ➜ git bisect good
Bisecting: 0 revisions left to test after this (roughly 1 step)
[cd82725023b0bbde750858397134bbdc0df1fd36] Pass server config to WebDriver via a file instead of an env variable. (#28834)

So that is https://github.com/web-platform-tests/wpt/pull/28834

James, would you have the time to check what's wrong here?

Flags: needinfo?(james)
Summary: Collections.py tests not being run due to wpt errors → [wdspec] Several tests fail to run due to wd_server_config.json not found

The WPT sync for that change was done via bug 1709566 for Firefox 90.

I had a quick peak and as it looks like the server config file gets deleted by Pytest itself. It seems to clean-up the temporary folder as passed in via --basetemp and as such the file is no longer available. Using another subfolder for pytest results seems to work fine. I'll check Pytest code to see if that is an expected behavior or a bug.

Flags: needinfo?(james)

And indeed the Pytest documentation for the default base temporary directory gives this warning:

The contents of mydir will be completely removed, so make sure to use a directory for that purpose only.

As such lets use a different path for Pytest specific tmp file usage.

Assignee: nobody → hskupin
Severity: -- → S2
Status: NEW → ASSIGNED
Priority: -- → P2
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fa1bcb99f5c4
[wptrunner] Use a dedicated pytest cache to prevent removal of wd_server_config.json. r=jgraham
https://hg.mozilla.org/integration/autoland/rev/c33bd46c07ae
[wdspec] Fix broken usage of inline fixture in get computed label/role tests. r=webdriver-reviewers,jgraham
https://hg.mozilla.org/integration/autoland/rev/9573b719e2c1
[wdspec] Updated expectation data for tests that errored due to missing wd_server_config.json file. r=webdriver-reviewers,jgraham
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/31954 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Upstream PR merged by moz-wptsync-bot

The patch landed in nightly and beta is affected.
:whimboo, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(hskupin)

Yes, given that we are early in the beta phase lets get all of these patches uplifted to have a better test coverage for wdspec tests on the beta branch. Thanks.

Flags: needinfo?(hskupin)
Whiteboard: [checkin-needed-beta]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: