Closed Bug 1823907 Opened 1 year ago Closed 1 month ago

Remove "desiredCapabilities" and "requiredCapabilities" from geckodriver

Categories

(Testing :: geckodriver, task, P2)

Default
task

Tracking

(firefox129 fixed)

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: whimboo, Assigned: jameshendry05)

References

(Blocks 3 open bugs, )

Details

(Whiteboard: [webdriver:m11][webdriver:external])

Attachments

(2 files)

Since bug 1495475 landed for geckodriver 0.23.0 around 5 years ago we started to warn about the usage of desiredCapabilities and requiredCapabilities. Most likely it will be the time now to finally get rid of their usage.

I have asked Selenium maintainers and right now it should only be the Java binding which is using both beside the capabilities. It would need to be discussed why this is done in Selenium and if it can be removed as well.

Priority: -- → P3
Whiteboard: [webdriver:backlog]

Lets schedule the removal of these capabilities for the next geckodriver release. The last Selenium binding that removed these capabilities was version 4.9 which has been released on April 23rd 2023.

Blocks: 1871543
Assignee: nobody → jameshendry05
Status: NEW → ASSIGNED
Whiteboard: [webdriver:backlog] → [webdriver:m10]
Whiteboard: [webdriver:m10] → [webdriver:m11]
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/630c6761da1a
[geckodriver] Remove "desiredCapabilities" and "requiredCapabilities" from geckodriver r=whimboo,webdriver-reviewers,jgraham

The patch as is is fine and the problem here is not with BrowserTime but with Arsenic:

[task 2024-05-23T20:30:48.854Z] 20:30:48     INFO -      return await driver.new_session(browser, bind=bind)
[task 2024-05-23T20:30:48.854Z] 20:30:48     INFO -    File "/home/cltbld/tasks/task_171649616353323/build/venv/lib/python3.9/site-packages/arsenic/webdriver.py", line 55, in new_session
[task 2024-05-23T20:30:48.854Z] 20:30:48     INFO -      raise SessionStartError(
[task 2024-05-23T20:30:48.855Z] 20:30:48     INFO -  arsenic.errors.SessionStartError: invalid argument: missing field `capabilities`

The version that gets installed in CI is arsenic==19.1 from 22nd January 2019. This is outdated and the latest version on PyPI is 21.8. When having a look at the code of this version I can see that desiredCapabilities are used, but not anymore in version 21.8.

As such we should bump the version of arsenic that we use in CI and also upload the 21.8 files to our internal PyPI mirror.

The in-tree references that I can find are the following:
https://searchfox.org/mozilla-central/search?q=arsenic-&path=&case=false&regexp=false

But before we can bump these versions lets ask for an upload of the packages. Alex, could you please do?

Flags: needinfo?(jameshendry05)
Flags: needinfo?(hskupin)
Flags: needinfo?(ahochheiden)

I've raised bug 1898793.

Flags: needinfo?(ahochheiden)

Thanks Alex!

James, would you mind to add a separate revision to the stack which bumps the version of the Python package as mentioned in comment 6? You will also have to make sure to update your webdriver patch and fix the merge conflicts because mine was landed. Thanks!

Flags: needinfo?(jameshendry05)
Priority: P3 → P2

The old version of arsenic uses deprecated geckodriver features which
this stack of patches removes

Attachment #9404800 - Attachment is obsolete: true
Attachment #9404800 - Attachment is obsolete: false
Attachment #9376794 - Attachment description: Bug 1823907: [geckodriver] Remove "desiredCapabilities" and "requiredCapabilities" from geckodriver r=whimboo → Bug 1823907: [geckodriver] Remove "desiredCapabilities" and "requiredCapabilities" from geckodriver r=whimboo,jgraham
Flags: needinfo?(jameshendry05)
Whiteboard: [webdriver:m11] → [webdriver:m11][webdriver:external]
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8b79724a90b1
[geckodriver] Bump version of arsenic to 21.8 r=whimboo,perftest-reviewers,sparky
https://hg.mozilla.org/integration/autoland/rev/0edfbf09d996
[geckodriver] Remove "desiredCapabilities" and "requiredCapabilities" from geckodriver r=whimboo,webdriver-reviewers,jgraham
Regressions: 1901669
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch

James, thank you for working on this change! It's a significant step forward in phasing out old, deprecated features that are no longer in use. To ensure developers are aware of this update, I've already announced it ahead of the next geckodriver release: https://x.com/FirefoxDevTools/status/1800468155023901022.

If you are still interested in another contribution please let me know, or as usual find a bug that is marked as mentored. Thanks!

Flags: needinfo?(jameshendry05)

Thanks, I'd love to do more. I was thinking about tackling bug 1443922, or I'm equally happy to do one that you select.

Flags: needinfo?(jameshendry05)

(In reply to jameshendry05 from comment #13)

Thanks, I'd love to do more. I was thinking about tackling bug 1443922, or I'm equally happy to do one that you select.

If you're interested in picking this up, feel free to do so. Alternatively, you could look at the dependencies for the next geckodriver release (bug 1871543) and choose one from there. Given your experience with geckodriver, you may not need to limit yourself to mentored bugs anymore. I'm around to help even if the bug is not mentored.

No longer regressions: 1901669
You need to log in before you can comment on or make changes to this bug.