Skip to content
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

deps: upgrade puppeteer to v21.3.6 #15490

Merged
merged 12 commits into from
Oct 4, 2023
Merged

deps: upgrade puppeteer to v21.3.6 #15490

merged 12 commits into from
Oct 4, 2023

Conversation

adamraine
Copy link
Member

Issues that forced us to pin the version (#15458) should be fixed now.

@adamraine adamraine requested a review from a team as a code owner September 22, 2023 17:32
@adamraine adamraine requested review from brendankenny and removed request for a team September 22, 2023 17:33
@adamraine adamraine changed the title deps: upgrade puppeteer to v21.3.3 deps: upgrade puppeteer to v21.3.4 Sep 25, 2023
@@ -190,7 +190,6 @@ async function buildBundle(entryPath, distPath, opts = {minify: true}) {
// resolved eventually.
plugins.partialLoaders.inlineFs({
verbose: Boolean(process.env.DEBUG),
ignorePaths: [require.resolve('puppeteer-core/lib/esm/puppeteer/common/Page.js')],
Copy link
Member Author

Choose a reason for hiding this comment

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

Page.js has moved but it looks like the comment that contained fs.readFileSync is not longer there so we should be good to remove.

frameUrl: 'http://localhost:10200/dobetterweb/dbw_tester.html',
}],
},
},
Copy link
Member Author

Choose a reason for hiding this comment

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

drive-by outdated bfcache failure


const browser = await puppeteer.launch({
Copy link
Member Author

Choose a reason for hiding this comment

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

Puppeteer will now disable the bfcache if we aren't using tab target which is currently only available through an environment variable PUPPETEER_INTERNAL_TAB_TARGET. The env variable needs to be set before puppeteer is imported so we would need to do some annoying dynamic imports.

This is an alternative approach which just uses chrome-launcher with our desired flags. This should be better for our smoke tests in general because it's closer to how Lighthouse launches Chrome.

@connorjclark
Copy link
Collaborator

related unit failure?

core/test/scenarios/api-test-pptr.js
= should know target type of network requests from frames created before timespan

@adamraine
Copy link
Member Author

related unit failure?

core/test/scenarios/api-test-pptr.js
= should know target type of network requests from frames created before timespan

Yup, I'll investigate.

@@ -164,7 +164,7 @@ describe('Individual modes API', function() {
const run = await api.startTimespan(state.page);
for (const iframe of page.frames()) {
if (iframe.url().includes('/oopif-simple-page.html')) {
iframe.click('button');
await iframe.click('button');
Copy link
Member Author

@adamraine adamraine Sep 25, 2023

Choose a reason for hiding this comment

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

Without this await the button click could happen after we end the timespan

This is a fix for the issue mentioned in #15490 (comment)

expect(networkRequests).toHaveLength(10);
expect(networkRequests.filter(r => r.sessionTargetType === 'page')).toHaveLength(2);
expect(networkRequests.filter(r => r.sessionTargetType === 'iframe')).toHaveLength(2);
expect(networkRequests.filter(r => r.sessionTargetType === 'worker')).toHaveLength(6);
Copy link
Member Author

Choose a reason for hiding this comment

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

All of these checks are redundant with the snapshot check just below. The snapshot check provides better details on failure so we should just fall to that if a request is missing.

@adamraine adamraine changed the title deps: upgrade puppeteer to v21.3.4 deps: upgrade puppeteer to v21.3.5 Sep 26, 2023
@adamraine adamraine changed the title deps: upgrade puppeteer to v21.3.5 deps: upgrade puppeteer to v21.3.6 Sep 28, 2023
@adamraine adamraine merged commit e2659f3 into main Oct 4, 2023
29 of 30 checks passed
@adamraine adamraine deleted the pptr_21.3.3 branch October 4, 2023 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants