Skip to content

Commit

Permalink
Fix rawChecksums in chromium build and rename for clarity (#44665) (#…
Browse files Browse the repository at this point in the history
…44704)

* Fix rawChecksums in chromium build and rename for clarity

* Update rawChecksum => binaryChecksum in chromium build docs

* Move over to Google Storage vs AWS

* Revert "Move over to Google Storage vs AWS"

This reverts commit 4781f9b.
  • Loading branch information
joelgriffith committed Sep 4, 2019
1 parent 9c85f93 commit 6b1f072
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions x-pack/build_chromium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ To run the build, replace the sha in the following commands with the sha that yo

After the build completes, there will be a .zip file and a .md5 file in `~/chromium/chromium/src/out/headless`. These are named like so: `chromium-{first_7_of_SHA}-{platform}`, for example: `chromium-4747cc2-linux`.

The zip files need to be deployed to s3. For testing, I drop them into `headless-shell-dev`, but for production, they need to be in `headless-shell`. And the `x-pack/legacy/plugins/reporting/server/browsers/chromium/paths.js` file needs to be upated to have the correct `archiveChecksum`, `archiveFilename`, `rawChecksum` and `baseUrl`. Below is a list of what the archive's are:
The zip files need to be deployed to s3. For testing, I drop them into `headless-shell-dev`, but for production, they need to be in `headless-shell`. And the `x-pack/legacy/plugins/reporting/server/browsers/chromium/paths.js` file needs to be upated to have the correct `archiveChecksum`, `archiveFilename`, `binaryChecksum` and `baseUrl`. Below is a list of what the archive's are:

- `archiveChecksum`: The contents of the `.md5` file, which is the `md5` checksum of the zip file.
- `rawChecksum`: The `md5` checksum of the `headless_shell` binary itself.
- `binaryChecksum`: The `md5` checksum of the `headless_shell` binary itself.

*If you're building in the cloud, don't forget to turn off your VM after retrieving the build artifacts!*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ export const paths = {
platforms: ['darwin', 'freebsd', 'openbsd'],
archiveFilename: 'chromium-312d84c-darwin.zip',
archiveChecksum: '020303e829745fd332ae9b39442ce570',
rawChecksum: '101dfea297c5818a7a3f3317a99dde02',
binaryChecksum: '5cdec11d45a0eddf782bed9b9f10319f',
binaryRelativePath: 'headless_shell-darwin/headless_shell',
},
{
platforms: ['linux'],
archiveFilename: 'chromium-312d84c-linux.zip',
archiveChecksum: '15ba9166a42f93ee92e42217b737018d',
rawChecksum: '3455db62ea4bd2d6e891e9155313305a',
binaryChecksum: 'c7fe36ed3e86a6dd23323be0a4e8c0fd',
binaryRelativePath: 'headless_shell-linux/headless_shell',
},
{
platforms: ['win32'],
archiveFilename: 'chromium-312d84c-windows.zip',
archiveChecksum: '3e36adfb755dacacc226ed5fd6b43105',
rawChecksum: 'ec7aa6cfecb172129474b447311275ec',
binaryChecksum: '9913e431fbfc7dfcd958db74ace4d58b',
binaryRelativePath: 'headless_shell-windows\\headless_shell.exe',
},
],
Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/reporting/server/browsers/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export async function installBrowser(
}

const binaryPath = path.join(installsPath, pkg.binaryRelativePath);
const rawChecksum = await md5(binaryPath).catch(() => '');
const binaryChecksum = await md5(binaryPath).catch(() => '');

if (rawChecksum !== pkg.rawChecksum) {
if (binaryChecksum !== pkg.binaryChecksum) {
const archive = path.join(browser.paths.archivesPath, pkg.archiveFilename);
logger.debug(`Extracting [${archive}] to [${binaryPath}]`);
await extract(archive, installsPath);
Expand Down

0 comments on commit 6b1f072

Please sign in to comment.