Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
"prop-types": "^15.7.2",
"proxy-from-env": "1.0.0",
"puid": "1.0.7",
"puppeteer": "24.1.1",
"puppeteer": "24.8.1",
"query-string": "^6.13.2",
"random-word-slugs": "^0.0.5",
"raw-loader": "^3.1.0",
Expand Down
87 changes: 45 additions & 42 deletions packages/kbn-screenshotting-server/src/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,87 +16,87 @@ export interface PackageInfo {
binaryChecksum: string;
binaryRelativePath: string;
isPreInstalled: boolean;
location: 'custom' | 'common';
revision: number;
location: 'custom' | 'chromeForTesting';
}

enum BaseUrl {
// see https://www.chromium.org/getting-involved/download-chromium
common = 'https://commondatastorage.googleapis.com/chromium-browser-snapshots',
// A GCS bucket under the Kibana team
custom = 'https://storage.googleapis.com/headless_shell',
// GCS bucket for headless chrome provided by the chrome team, see
// https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints
chromeForTesting = 'https://storage.googleapis.com/chrome-for-testing-public',
}

interface CustomPackageInfo extends PackageInfo {
location: 'custom';
}
interface CommonPackageInfo extends PackageInfo {
location: 'common';

interface ChromeForTestingPackageInfo extends PackageInfo {
version: string;
location: 'chromeForTesting';
archivePath: string;
}

function isCommonPackage(p: PackageInfo): p is CommonPackageInfo {
return p.location === 'common';
function isChromeForTestingPackage(p: PackageInfo): p is ChromeForTestingPackageInfo {
return p.location === 'chromeForTesting';
}

export class ChromiumArchivePaths {
public readonly packages: Array<CustomPackageInfo | CommonPackageInfo> = [
public readonly packages: Array<CustomPackageInfo | ChromeForTestingPackageInfo> = [
{
platform: 'darwin',
architecture: 'x64',
archiveFilename: 'chrome-mac.zip',
archiveChecksum: '0dc11a5ecbe650077962f590f745aeacf655573dc1902181e2bddc82fb4dc067',
binaryChecksum: '4e2bb7b2cff0afea3ae1fc8a53474de807183a66b3c99b8f53e3869997232675',
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
revision: 1381526,
location: 'common',
archivePath: 'Mac',
archiveFilename: 'chrome-headless-shell-mac-x64.zip',
archiveChecksum: '772b1fec39826e0604d21e515ee27c47bdfb7a5d69e8674d818b0c159c3dfcb2',
binaryChecksum: '493f63172a7b76d12c844427bfdc67d391175e42cba99025277ffce31a7587f7',
binaryRelativePath: 'chrome-headless-shell-mac-x64/chrome-headless-shell',
version: '136.0.7103.49',
location: 'chromeForTesting',
archivePath: 'mac-x64',
isPreInstalled: false,
},
{
platform: 'darwin',
architecture: 'arm64',
archiveFilename: 'chrome-mac.zip',
archiveChecksum: '48b51bceaf6d900748704c938c74e0ea581ee235f7cabe2a62ea09ce0f2d8361',
binaryChecksum: '8bd08f8e40f4edf7546adbe4b339a986b440f2737be84158e8bf8866992e59c7',
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
revision: 1381538,
location: 'common',
archivePath: 'Mac_Arm',
archiveFilename: 'chrome-headless-shell-mac-arm64.zip',
archiveChecksum: '30c5215f2b3caa3321de7c0e0de7225b13cbdd970f7c3f68c774be0ca34fc4e3',
binaryChecksum: '6ada593813656a62560680f510a34f0937537ce8518cb60dcdd0c3ceace97f50',
binaryRelativePath: 'chrome-headless-shell-mac-arm64/chrome-headless-shell',
version: '136.0.7103.49',
location: 'chromeForTesting',
archivePath: 'mac-arm64',
isPreInstalled: false,
},
{
platform: 'linux',
architecture: 'x64',
archiveFilename: 'chromium-df453a3-locales-linux_x64.zip',
archiveChecksum: '90c6adae9efdda89aeab9df58bce176e8fad137bb2e22bf6193fd6de766ff867',
binaryChecksum: '7dd357acbad7f7ee29b33949ef0a63ac5a51a26c6474ae8762d18a337a315b78',
archiveFilename: 'chromium-031848b-locales-linux_x64.zip',
archiveChecksum: '2f8ede6c874cbf71f6d64ad5c88b33e0f91bdddb4f5684fa6148702ce85550d7',
binaryChecksum: '12ba32eadf7dc1e3bd2c72707dfc100d4c9dd6eaddd5568f407a2ed66156e1d1',
binaryRelativePath: 'headless_shell-linux_x64/headless_shell',
revision: 1381561,
location: 'custom',
isPreInstalled: true,
},
{
platform: 'linux',
architecture: 'arm64',
archiveFilename: 'chromium-df453a3-locales-linux_arm64.zip',
archiveChecksum: 'a13110193e746913c661ab6c07403b1aa5018cb1c8f0e7890da486a1fb2a413e',
binaryChecksum: 'c03865b5afc998107281547178440d49a56b2de32e6ecfaaa3b1db8697229fa3',
archiveFilename: 'chromium-031848b-locales-linux_arm64.zip',
archiveChecksum: 'de7571709d3b25cd15c48949bb5d72665b98ed527d73dbffbb96116dd5aeaae9',
binaryChecksum: 'c2cee1a7906e0c0905153bcc40ece031be5028d075b88736629280ac80877246',
binaryRelativePath: 'headless_shell-linux_arm64/headless_shell',
revision: 1381561,
location: 'custom',
isPreInstalled: true,
},
{
platform: 'win32',
architecture: 'x64',
archiveFilename: 'chrome-win.zip',
archiveChecksum: '429e1a038124414e2908f026410e2f6bf8c81459fc5af8e03c9585237f391d01',
binaryChecksum: 'b49344c444fb0b543825dec26e4cadf9d5ffa648fdd9ec7f7d5d0961982dc758',
binaryRelativePath: path.join('chrome-win', 'chrome.exe'),
revision: 1381560,
location: 'common',
archivePath: 'Win',
archiveFilename: 'chrome-headless-shell-win64.zip',
archiveChecksum: 'a4a82311596166c6148df6d1d1497d9bb5397895c47f67abcde4b368180418bc',
binaryChecksum: '574d3b27846bdeaafb73632f1f6aac001dc895165465ae11bcd3fedb35cfa9dd',
binaryRelativePath: path.join('chrome-headless-shell-win64', 'chrome-headless-shell.exe'),
version: '136.0.7103.49',
location: 'chromeForTesting',
archivePath: 'win64',
isPreInstalled: true,
},
];
Expand All @@ -118,11 +118,14 @@ export class ChromiumArchivePaths {
}

public getDownloadUrl(p: PackageInfo) {
if (isCommonPackage(p)) {
const { common } = BaseUrl;
const { archivePath, revision, archiveFilename } = p;
return `${common}/${archivePath}/${revision}/${archiveFilename}`;
if (isChromeForTestingPackage(p)) {
const { chromeForTesting } = BaseUrl;
const { archivePath, version, archiveFilename } = p;
// returned string matches download value found at the following endpoint;
// https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json
return `${chromeForTesting}/${version}/${archivePath}/${archiveFilename}`;
}

return BaseUrl.custom + '/' + p.archiveFilename; // revision is not used for URL if package is a custom build
}

Expand Down
97 changes: 44 additions & 53 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3945,18 +3945,17 @@
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=

"@puppeteer/browsers@2.7.0":
version "2.7.0"
resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.7.0.tgz#dad70b30458f4e0855b2f402055f408823cc67c5"
integrity sha512-bO61XnTuopsz9kvtfqhVbH6LTM1koxK0IlBR+yuVrM2LB7mk8+5o1w18l5zqd5cs8xlf+ntgambqRqGifMDjog==
"@puppeteer/browsers@2.10.3":
version "2.10.3"
resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.10.3.tgz#4d89b3520359da6f7016ff96316c2c243be2b3ee"
integrity sha512-iPpnFpX25gKIVsHsqVjHV+/GzW36xPgsscWkCnrrETndcdxNsXLdCrTwhkCJNR/FGWr122dJUBeyV4niz/j3TA==
dependencies:
debug "^4.4.0"
extract-zip "^2.0.1"
progress "^2.0.3"
proxy-agent "^6.5.0"
semver "^7.6.3"
tar-fs "^3.0.6"
unbzip2-stream "^1.4.3"
semver "^7.7.1"
tar-fs "^3.0.8"
yargs "^17.7.2"

"@redux-saga/core@^1.1.3":
Expand Down Expand Up @@ -9076,7 +9075,7 @@ buffer@^4.3.0:
ieee754 "^1.1.4"
isarray "^1.0.0"

buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0:
buffer@^5.5.0, buffer@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
Expand Down Expand Up @@ -9523,13 +9522,13 @@ chromedriver@^134.0.2:
proxy-from-env "^1.1.0"
tcp-port-used "^1.0.2"

chromium-bidi@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-1.1.0.tgz#45e7d050ef512393424b6faa32a0ba67b2194040"
integrity sha512-HislCEczCuamWm3+55Lig9XKmMF13K+BGKum9rwtDAzgUAHT4h5jNwhDmD4U20VoVUG8ujnv9UZ89qiIf5uF8w==
chromium-bidi@5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-5.1.0.tgz#8d0e47f7ac9270262df29792318dd5378e983e62"
integrity sha512-9MSRhWRVoRPDG0TgzkHrshFSJJNZzfY5UFqUMuksg7zL1yoZIZ3jLB0YAgHclbiAxPI86pBnwDX1tbzoiV8aFw==
dependencies:
mitt "3.0.1"
zod "3.24.1"
mitt "^3.0.1"
zod "^3.24.1"

ci-info@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -11649,10 +11648,10 @@ detective@^5.0.2:
defined "^1.0.0"
minimist "^1.1.1"

devtools-protocol@0.0.1380148:
version "0.0.1380148"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1380148.tgz#7dcdad06515135b244ff05878ca8019e041c1c55"
integrity sha512-1CJABgqLxbYxVI+uJY/UDUHJtJ0KZTSjNYJYKqd9FRoXT33WDakDHNxRapMEgzeJ/C3rcs01+avshMnPmKQbvA==
devtools-protocol@0.0.1439962:
version "0.0.1439962"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1439962.tgz#395c5ca1cd83aa451c667056a025f9873c4598c1"
integrity sha512-jJF48UdryzKiWhJ1bLKr7BFWUQCEIT5uCNbDLqkQJBtkFxYzILJH44WN0PDKMIlGDN7Utb8vyUY85C3w4R/t2g==

dezalgo@^1.0.0, dezalgo@^1.0.4:
version "1.0.4"
Expand Down Expand Up @@ -18948,7 +18947,7 @@ mississippi@^3.0.0:
stream-each "^1.1.0"
through2 "^2.0.0"

mitt@3.0.1:
mitt@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1"
integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==
Expand Down Expand Up @@ -21712,28 +21711,28 @@ pupa@^3.1.0:
dependencies:
escape-goat "^4.0.0"

puppeteer-core@24.1.1:
version "24.1.1"
resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-24.1.1.tgz#cbf5a888168559e66319c0418f877a553c8ed2fa"
integrity sha512-7FF3gq6bpIsbq3I8mfbodXh3DCzXagoz3l2eGv1cXooYU4g0P4mcHQVHuBD4iSZPXNg8WjzlP5kmRwK9UvwF0A==
puppeteer-core@24.8.1:
version "24.8.1"
resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-24.8.1.tgz#20728f431f4ed2daba23515df1f1a586c663b4ba"
integrity sha512-UP/VIxVk/Akrgql3a55ZAIuAIx7+yQevz6qEXFUtSTIynEcgsCJ6tlRdi7uKAAlovmNQG4iNMzq9f8WxZLnGGg==
dependencies:
"@puppeteer/browsers" "2.7.0"
chromium-bidi "1.1.0"
"@puppeteer/browsers" "2.10.3"
chromium-bidi "5.1.0"
debug "^4.4.0"
devtools-protocol "0.0.1380148"
devtools-protocol "0.0.1439962"
typed-query-selector "^2.12.0"
ws "^8.18.0"
ws "^8.18.2"

puppeteer@24.1.1:
version "24.1.1"
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-24.1.1.tgz#dadcfbe05b25a54aee7061325631145db568890b"
integrity sha512-fuhceZ5HZuDXVuaMIRxUuDHfCJLmK0pXh8FlzVQ0/+OApStevxZhU5kAVeYFOEqeCF5OoAyZjcWbdQK27xW/9A==
puppeteer@24.8.1:
version "24.8.1"
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-24.8.1.tgz#820ecaec7a793ab5b8fa30269ae5e1b8e7c68cc8"
integrity sha512-5OvJCe6tQ09EWf35qqyoH/cr9YGMbLj0ZpoT2pEImF9Ox35JXyAn8kIqj8eBgpDfyzuEwXYIMUwIAIkdgO/gDA==
dependencies:
"@puppeteer/browsers" "2.7.0"
chromium-bidi "1.1.0"
"@puppeteer/browsers" "2.10.3"
chromium-bidi "5.1.0"
cosmiconfig "^9.0.0"
devtools-protocol "0.0.1380148"
puppeteer-core "24.1.1"
devtools-protocol "0.0.1439962"
puppeteer-core "24.8.1"
typed-query-selector "^2.12.0"

pure-rand@^6.0.0:
Expand Down Expand Up @@ -23956,7 +23955,7 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.3.0, semver@^6.3.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==

semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.0, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3, semver@^7.7.2:
semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.0, semver@^7.5.3, semver@^7.5.4, semver@^7.7.1, semver@^7.7.2:
version "7.7.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58"
integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==
Expand Down Expand Up @@ -25520,7 +25519,7 @@ tar-fs@^2.0.0, tar-fs@^2.1.0:
pump "^3.0.0"
tar-stream "^2.1.4"

tar-fs@^3.0.4, tar-fs@^3.0.6:
tar-fs@^3.0.4, tar-fs@^3.0.6, tar-fs@^3.0.8:
version "3.0.9"
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.9.tgz#d570793c6370d7078926c41fa422891566a0b617"
integrity sha512-XF4w9Xp+ZQgifKakjZYmFdkLoSWd34VGKcsTCwlNWM7QG3ZbaxnTsaBwnjFZqHRf/rROxaR8rXnbtwdvaDI+lA==
Expand Down Expand Up @@ -26408,14 +26407,6 @@ unbox-primitive@^1.0.2:
has-symbols "^1.0.3"
which-boxed-primitive "^1.0.2"

unbzip2-stream@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7"
integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==
dependencies:
buffer "^5.2.1"
through "^2.3.8"

unc-path-regex@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
Expand Down Expand Up @@ -28164,10 +28155,10 @@ ws@^7.3.1, ws@^7.4.6:
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9"
integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==

ws@^8.11.0, ws@^8.18.0, ws@^8.2.3, ws@^8.4.2:
version "8.18.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc"
integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==
ws@^8.11.0, ws@^8.18.0, ws@^8.18.2, ws@^8.2.3, ws@^8.4.2:
version "8.18.2"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.2.tgz#42738b2be57ced85f46154320aabb51ab003705a"
integrity sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==

x-default-browser@^0.4.0:
version "0.4.0"
Expand Down Expand Up @@ -28498,10 +28489,10 @@ zlib@^1.0.5:
resolved "https://registry.yarnpkg.com/zlib/-/zlib-1.0.5.tgz#6e7c972fc371c645a6afb03ab14769def114fcc0"
integrity sha1-bnyXL8NxxkWmr7A6sUdp3vEU/MA=

zod@3.24.1:
version "3.24.1"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.24.1.tgz#27445c912738c8ad1e9de1bea0359fa44d9d35ee"
integrity sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==
zod@^3.24.1:
version "3.25.56"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.25.56.tgz#4cff0340b7cd3778314dac1e74d6a663ffeef914"
integrity sha512-rd6eEF3BTNvQnR2e2wwolfTmUTnp70aUTqr0oaGbHifzC3BKJsoV+Gat8vxUMR1hwOKBs6El+qWehrHbCpW6SQ==

zwitch@^1.0.0:
version "1.0.5"
Expand Down