Closed Bug 1562043 Opened 5 years ago Closed 5 years ago

Broken formatting of webdriver commands and responses in the log file

Categories

(Testing :: geckodriver, defect, P3)

69 Branch
defect

Tracking

(firefox-esr60 unaffected, firefox-esr68 unaffected, firefox68 unaffected, firefox69 wontfix, firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox68 --- unaffected
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: whimboo, Assigned: eijebong)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Since bug 1396824 has been landed there is a broken log output format for the webdriver crate:

Before: POST /session/d6f90a56-e378-4c58-83e7-7a037ee624a1/alert/dismiss {}
After: `POST /session/{sessionId}/alert/dismiss Ok("{}")

As it looks like it's not correctly formatted, given that no actual sessionId is filled in, and there is an extra Ok() wrapper for the body. Get requests are similar with Ok("").

We should fix that for the 0.25.0 release.

Bastian, mind having a look?

Flags: needinfo?(eijebong)

So I think the easiest way to do this would be to add a warp::path::full() filter to the route building code and add it as a parameter to the built closure. This would give us the actual called path.
The other alternative would be to rebuild that path from the route we currently have and parameters but that seems way too complicated.

Any thoughts on that ?

Flags: needinfo?(eijebong) → needinfo?(ato)

I don’t have an opinion on this on the count that I don’t know warp
intimately.

Passing along some additional data (at the expense of memory) instead
of reconstructing it (at the expense of computation) seems reasonable
to me, if I understand the constraints you’re concerned about.

Flags: needinfo?(ato)

Since we moved to warp, this debug statement was printing the
unprocessed path (i.e /session/{sessionId}) because the closure didn't
know about the real path that was called (it only knew about the route
that was triggered and the parameters that were passed).

I added a warp filter to get the unprocessed full path to be able to
make logging useful again. This also fixes the body which had an extra
Result around it when it was debugged.

Pushed by atolfsen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/45103a964331 Fix a debug statement when processing webdriver requests. r=ato
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → eijebong

Is this something we should consider uplifting to Beta for Fx69?

That shouldn’t be necessary since this code isn’t part of Firefox,
but instead ships as separate binary.

Flags: needinfo?(eijebong)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: