[Screenshotting] fix revision number used for mac and windows downloads of chromium (#155313)

## Summary

Closes https://github.com/elastic/kibana/issues/155681

Fixes an issue where Mac and Windows Chromium downloads are referencing
a bucket from an older version of Kibana.

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- This has not completed since designing tests around this will take
some time: https://github.com/elastic/kibana/issues/155753

### Release note
Fixed an issue for Windows and Mac where the Reporting plugin downloaded
an older version of Chromium. All OS types are now synchronized to
107.0.5296.0
This commit is contained in:
Tim Sullivan 2023-04-25 10:07:51 -07:00 committed by GitHub
parent bc7c5fcad9
commit 4217ec2e4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 8 deletions

View file

@ -46,7 +46,7 @@ async function getChromiumRevision(
kibanaPuppeteerVersion: PuppeteerRelease,
log: ToolingLog
): Promise<ChromiumRevision> {
const url = `https://raw.githubusercontent.com/puppeteer/puppeteer/v${kibanaPuppeteerVersion}/src/revisions.ts`;
const url = `https://raw.githubusercontent.com/puppeteer/puppeteer/v${kibanaPuppeteerVersion}/packages/puppeteer-core/src/revisions.ts`;
let body: string;
try {
log.info(`Fetching code from Puppeteer source: ${url}`);
@ -103,7 +103,12 @@ async function getChromiumCommit(
throw new Error(`Could not find a Chromium commit! Check ${url} in a browser.`);
}
const baseUrl = 'https://commondatastorage.googleapis.com/chromium-browser-snapshots';
log.info(`Found Chromium commit ${commit} from revision ${revision}.`);
log.info(`Mac x64 download: ${baseUrl}/Mac/${revision}/chrome-mac.zip`);
log.info(`Mac ARM download: ${baseUrl}/Mac_Arm/${revision}/chrome-mac.zip`);
log.info(`Windows x64 download: ${baseUrl}/Win/${revision}/chrome-win.zip`);
return commit;
}

View file

@ -18,7 +18,7 @@ export interface PackageInfo {
location: 'custom' | 'common';
}
const REVISION = 1036745;
const REVISION = 1045629;
enum BaseUrl {
// see https://www.chromium.org/getting-involved/download-chromium
@ -45,8 +45,8 @@ export class ChromiumArchivePaths {
platform: 'darwin',
architecture: 'x64',
archiveFilename: 'chrome-mac.zip',
archiveChecksum: 'dd4d44ad97ba2fef5dc47d7f2a39ccaa',
binaryChecksum: '4a7a663b2656d66ce975b00a30df3ab4',
archiveChecksum: '028606a28586800b70d249d050a360d5',
binaryChecksum: 'db876895b31ed6923cb1e99fea12062e',
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
location: 'common',
archivePath: 'Mac',
@ -56,8 +56,8 @@ export class ChromiumArchivePaths {
platform: 'darwin',
architecture: 'arm64',
archiveFilename: 'chrome-mac.zip',
archiveChecksum: '5afc0d49865d55b69ea1ff65b9cc5794',
binaryChecksum: '4a7a663b2656d66ce975b00a30df3ab4',
archiveChecksum: '727029f573d3b85be596b80b810b0237',
binaryChecksum: '8668272094c610c15bad15b068f8f73c',
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
location: 'common',
archivePath: 'Mac_Arm',
@ -87,8 +87,8 @@ export class ChromiumArchivePaths {
platform: 'win32',
architecture: 'x64',
archiveFilename: 'chrome-win.zip',
archiveChecksum: '42db052673414b89d8cb45657c1a6aeb',
binaryChecksum: '1b6eef775198ffd48fb9669ac0c818f7',
archiveChecksum: '2e24beb0e1d7201bad98b8c231c63d97',
binaryChecksum: '47b1e6d9179fb8cadeef9c8939dce12d',
binaryRelativePath: path.join('chrome-win', 'chrome.exe'),
location: 'common',
archivePath: 'Win',