Skip to content

Commit

Permalink
[Screenshotting] fix revision number used for mac and windows downloa…
Browse files Browse the repository at this point in the history
…ds of chromium (elastic#155313)

## Summary

Closes elastic#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: elastic#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
  • Loading branch information
tsullivan authored Apr 25, 2023
1 parent bc7c5fc commit 4217ec2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
7 changes: 6 additions & 1 deletion src/dev/chromium_version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down Expand Up @@ -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;
}

Expand Down
14 changes: 7 additions & 7 deletions x-pack/plugins/screenshotting/server/browsers/chromium/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 4217ec2

Please sign in to comment.