Closed Bug 1878632 Opened 3 months ago Closed 2 months ago

Sync vendored puppeteer to v22.4.0

Categories

(Remote Protocol :: Agent, task, P2)

task
Points:
5

Tracking

(firefox125 fixed)

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [webdriver:m10])

Attachments

(3 files, 3 obsolete files)

On bug 1877214 we synced Puppeteer 21.10.0. Now we can sync version 22.0.0 which contains support for user context and cookie.

Changes in this release:

Changes that might affect us:

  • remove PUPPETEER_DOWNLOAD_PATH in favor of PUPPETEER_CACHE_DIR
  • drop support for node16

While they dropped support for node 16 it should still work so that our puppeteer tests are not affected even through they run on Node 16 (bug 1875239).

Points: --- → 3
Priority: -- → P2
Blocks: 1877629
Assignee: nobody → hskupin
Status: NEW → ASSIGNED

The deprecation of Node 16 and especially the new features only available starting with Node 18 causing us trouble. Here is what's broken so far:

  • ReadableStream is now used for streaming data when creating PDF documents and capturing screenshots
  • URL.canParse is used when setting cookies, and that throws a not a function error

I'm going to make bug 1875239 a blocker for the next sync, but it's unclear when it will be fixed.

Alex, do you have any suggestions or workarounds that could be used? The ReadableStream is not that important because it mainly affects CDP but URL.canParse is affecting quite a lot of WebDriver BiDi tests.

Depends on: 1875239
Flags: needinfo?(alexrudenko)
See Also: 1875239

Just saw this, so apologies for the delay. I think you can try to add a polyfill to your internal checkout https://developer.mozilla.org/en-US/docs/Web/API/URL/canParse_static#see_also I am not sure about details on how adding works so it might require a polyfill. There are polyfills for ReadbaleStream too https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream#see_also

Flags: needinfo?(alexrudenko)

But that would require us to update various Puppeteer sources. I don't think that this is a good idea because it needs to be applied each time when we vendor in a new version of Puppeteer.

I spent a bit of time today and investigated other possible options. Given that bug 1875239 is actually blocked on our ubuntu1804-test docker images being more than outdated, we require the new wayland workers, which are currently created but also already available as experimental. I've asked to get node.js installed on them so it will be a version as shipped with standard Ubuntu LTS release - which should be modern enough.

I'll try it out once node.js is available: https://mozilla-hub.atlassian.net/browse/RELOPS-852

As it was noticed by build system peers we can still build Node 18 ourselves even on Ubuntu 18.04. As such patches are now available that will upgrade our test toolchains from Node 16 (and even Node 12) to Node 18. Once that's done we can continue with this vendoring.

Note that we most likely also won't no longer need the patch Remove -S parameter in Shebang from mocha-runner script because it's not supported in CI. given that hopefully should work in Node 18 as well. I'll test that once I can use the new Node version.

https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-v22.2.0 was just released.

Node18 should now be used to run the tests, but it seems we still need to remove -S.

Summary: Sync vendored puppeteer to v22.0.0 → Sync vendored puppeteer to v22.2.0

I am getting a significant amount of intermittent failures on try with this v22.2.0 (11 so far, but I keep getting new ones on try).

Depends on D202587

Attachment #9382313 - Attachment is obsolete: true
Attachment #9382314 - Attachment is obsolete: true
Attachment #9382315 - Attachment is obsolete: true

Version 22.3.0 got released today so I'll take that one as base.

Summary: Sync vendored puppeteer to v22.2.0 → Sync vendored puppeteer to v22.3.0
Blocks: 1882401
Attachment #9378518 - Attachment description: Bug 1878632 - [puppeteer] Sync vendored puppeteer to v22.0.0. → Bug 1878632 - [puppeteer] Sync vendored puppeteer to v22.3.0.

Sadly we cannot upgrade until bug 1882454 is fixed.

Depends on: 1882454

A fix for bug 1882454 will no longer be needed for now with the workaround patch in Puppeteer which will be available with the next Puppeteer release.

As such lets wait for the next release which will also include a fix for bug 1882748 to only enable CDP or BiDi with Puppeteer. A new release most likely gets released tomorrow.

Depends on: 1882085
No longer depends on: 1882454
Summary: Sync vendored puppeteer to v22.3.0 → Sync vendored puppeteer to v22.4.0

Due to the complexity of vendoring in any new version including the investigation of failures and additional fixes we agreed on bumping the points to 5.

Points: 3 → 5

For the new release we may not need any changes to test expectations. But lets see. Here a try build:

https://treeherder.mozilla.org/jobs?repo=try&revision=2e031f55d96011593d4dd755dca11cfe94cdf89d

Attachment #9378518 - Attachment description: Bug 1878632 - [puppeteer] Sync vendored puppeteer to v22.3.0. → Bug 1878632 - [puppeteer] Sync vendored puppeteer to v22.4.0.
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6ad7edd829fc
[puppeteer] Sync vendored puppeteer to v22.4.0. r=webdriver-reviewers,Sasha
https://hg.mozilla.org/integration/autoland/rev/f909192f679b
[puppeteer] Remove -S parameter in Shebang from mocha-runner script because it's not supported in CI. r=webdriver-reviewers,jdescottes
https://hg.mozilla.org/integration/autoland/rev/af1440594413
[puppeteer] Update test expectations. r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch

Here the statistics for the vendoring as seen in logs for Wd jobs:

Before: "suites":249,"tests":1060,"passes":620,"pending":291,"failures":149
After: "suites":251,"tests":1050,"passes":604,"pending":333,"failures":113

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: