Closed Bug 1881587 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 44735 - Revert "[wptrunner] Log which browser (PID) ran each test"

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox125 fixed)

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 44735 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/44735
Details from upstream follow.

Jonathan Lee <jonathan-j-lee@users.noreply.github.com> wrote:

Revert "[wptrunner] Log which browser (PID) ran each test"

Reverts web-platform-tests/wpt#44716

Causing widespread wpt-firefox-nightly-stability failures like:

mozlog.structuredlog: Failure calling log handler:
Traceback (most recent call last):
  File "/home/test/web-platform-tests/tools/third_party_modified/mozlog/mozlog/structuredlog.py", line 311, in _handle_log
    handler(data)
  File "/home/test/web-platform-tests/tools/third_party_modified/mozlog/mozlog/handlers/base.py", line 62, in __call__
    formatted = self.formatter(data)
  File "/home/test/web-platform-tests/tools/third_party_modified/mozlog/mozlog/formatters/__init__.py", line 20, in <lambda>
    return lambda x: json.dumps(x) + "\n"
  File "/usr/lib/python3.8/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type method is not JSON serializable

... because FirefoxBrowser defines pid as a plain instance method:

https://github.com/web-platform-tests/wpt/blob/a9c74d5a999b5fbf5fd8895078b0fd6c4cf1f3b3/tools/wptrunner/wptrunner/browsers/firefox.py#L866-L868

... but WebDriverBrowser (which chrome is based on) makes pid a property:

https://github.com/web-platform-tests/wpt/blob/a9c74d5a999b5fbf5fd8895078b0fd6c4cf1f3b3/tools/wptrunner/wptrunner/browsers/base.py#L395-L398

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7d50df905d96 [wpt PR 44735] - Revert "[wptrunner] Log which browser (PID) ran each test", a=testonly
Test result changes from PR not available.
Status: REOPENED → RESOLVED
Closed: 2 years ago → 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.