Skip to content

chore: port websocket in ext to bidi #31209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 18, 2025

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Mar 3, 2025

Additional details

Cuts over the remaining methods in the web extension that are possible (currently only used by firefox) to WebDriver BiDi. This gets us about 90% off of the websocket in the webextension via this BiDi port, which also helps us when debugging the app code in the server.

This should close the epic #29714, but does not entirely get us off the web extension for socket commands as documented in #30447 (see #30221 (comment) for more details on what is still needed and why).

Steps to test

How has the user experience changed?

PR Tasks

Copy link

cypress bot commented Mar 3, 2025

cypress    Run #61727

Run Properties:  status check passed Passed #61727  •  git commit 45259dd796: Merge branch 'release/15.0.0' into chore/port_websocket_in_ext_to_bidi
Project cypress
Branch Review chore/port_websocket_in_ext_to_bidi
Run status status check passed Passed #61727
Run duration 09m 22s
Commit git commit 45259dd796: Merge branch 'release/15.0.0' into chore/port_websocket_in_ext_to_bidi
Committer Bill Glesias
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 694
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 130
View all changes introduced in this branch ↗︎

@AtofStryker AtofStryker force-pushed the breaking/remove_cdp_firefox branch 2 times, most recently from c7f8493 to e3bac5f Compare April 3, 2025 15:32
Base automatically changed from breaking/remove_cdp_firefox to release/15.0.0 April 3, 2025 17:42
@AtofStryker AtofStryker force-pushed the chore/port_websocket_in_ext_to_bidi branch 2 times, most recently from caa42e1 to e970a54 Compare April 8, 2025 20:19
@AtofStryker AtofStryker force-pushed the chore/port_websocket_in_ext_to_bidi branch from e970a54 to f76f89d Compare April 9, 2025 18:48
@AtofStryker AtofStryker changed the title DRAFT TO CLOSE: port websocket in ext to bidi chore: port websocket in ext to bidi Apr 9, 2025
@@ -122,287 +121,6 @@ describe('lib/socket', () => {
})
})

context('on(automation:request)', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these tests I wanted to keep but I can't even get them to run locally ☹️

@AtofStryker AtofStryker self-assigned this Apr 10, 2025

// CLOSE ALL BUT THE NEW CONTEXT, which makes it active
// also do not need to navigate to about:blank as this happens by default
for (const context of contexts) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: add #31480 to comments

return false
}

if (filter.path && filter.path !== cookie.path) {
if (filter?.path && !pathMatch(filter.path, cookie.path)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a part of the migration? Or a separate improvement? Mostly just curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its an improvement which we need since bidi cookie filter criteria is a bit different. What we really want is to check path hierarchy and not an exact match.

For instance, cookies going to request /foo should send cookies that have / or /foo as the path, but not /bar. If we are checking for strict equality on just path, only 1 of those 3 would be sent, which is incorrect. We don't notice this with CDP because it does this implicitly when we look up cookies

@ryanthemanuel
Copy link
Collaborator

Looks good to me. Ran some e2e/ct tests and Run all specs in firefox.

@AtofStryker AtofStryker merged commit 0a51e6d into release/15.0.0 Apr 18, 2025
86 of 87 checks passed
@AtofStryker AtofStryker deleted the chore/port_websocket_in_ext_to_bidi branch April 18, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

misc: Replace @packages/extension methods that are now implemented by WebDriver BiDi when BiDi is enabled
4 participants