[17.3.x]: build: follow-up fixes for AIO lighthouse checks (#55065)

* build: follow-up fixes for AIO lighthouse checks

Looks like the latest versions of Lighthouse and puppeteer
are not compatible with our Chromium version from dev-infra.

This commit reverts the updates, and fixes the jobs.

Update payload size; now matching — seems expected
This commit is contained in:
Paul Gschwendtner 2024-03-27 15:46:46 +01:00 committed by GitHub
parent 9aff43b5e8
commit 2ad5dcf3f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 487 additions and 341 deletions

View file

@ -138,14 +138,14 @@
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"light-server": "^2.9.1",
"lighthouse": "^11.0.0",
"lighthouse": "~9.0.0",
"lighthouse-logger": "^2.0.0",
"lodash": "^4.17.21",
"lunr": "^2.3.9",
"npm-run-all": "^4.1.5",
"patch-package": "^7.0.0",
"protractor": "~7.0.0",
"puppeteer-core": "22.5.0",
"puppeteer-core": "~21.3.8",
"rehype-slug": "^4.0.1",
"remark": "^12.0.0",
"remark-html": "^13.0.0",

View file

@ -28,7 +28,7 @@
// Imports
import lighthouse from 'lighthouse';
import * as printer from 'lighthouse/cli/printer.js';
import * as printer from 'lighthouse/lighthouse-cli/printer.js';
import logger from 'lighthouse-logger';
import puppeteer from 'puppeteer-core';
import path from 'path';
@ -60,6 +60,7 @@ async function _main(args) {
console.log(`Running web-app audits for '${url}'...`);
console.log(` Audit categories: ${lhFlags.onlyCategories.join(', ')}`);
console.log(process.env.CHROME_BIN);
logger.setLevel(lhFlags.logLevel);
@ -68,9 +69,11 @@ async function _main(args) {
const startTime = Date.now();
const browser = await puppeteer.launch({
executablePath: path.resolve(process.env.CHROME_BIN),
args: ['--no-sandbox', '--headless']
args: ['--no-sandbox', '--headless'],
});
console.log('launched');
const browserVersion = await browser.version();
console.log(browserVersion);
const results = await runLighthouse(browser, url, lhFlags, lhConfig);
console.log(
@ -171,7 +174,7 @@ async function processResults(results, minScores, logFile) {
async function runLighthouse(browser, url, flags, config) {
try {
flags.logLevel = 'silent';
flags.logLevel = 'info';
flags.port = (new URL(browser.wsEndpoint())).port;
return await lighthouse(url, flags, config);
} finally {

View file

@ -22,7 +22,7 @@ sh.set('-e');
// Constants
const MIN_SCORES_PER_PAGE = {
'': 96,
'api': 96,
'api': 91,
'api/core/Directive': 95,
'cli': 95,
'cli/add': 96,

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
"aio": {
"uncompressed": {
"runtime": 4252,
"main": 525680,
"main": 531058,
"polyfills": 33862,
"styles": 60209,
"light-theme": 31691,