Skip to content

Commit 6a2d014

Browse files
eokoneyokibanamachineelasticmachine
authored
[Reporting] upgrade puppeteer to v22.13.1 (#189485)
## Summary Update for puppeteer, the following changeset updates puppeteer to version `22.13.1`. The chromium version required for this version of puppeteer is `126.0.6478.182` from revision `1300313`, as such the chromium binary included for windows and darwin platforms either match or were the closest revision to the expectation. The linux headless binary was built from commit `5b5d8292ddf182f8b2096fa665b473b6317906d5` of the same revision. <!-- ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes&mdash;Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --> ### How to verify linux headless build - clone the following repo https://github.com/tsullivan/kibana-dev-docker - pull this particular PR - follow the steps outlined in the repo, replacing any occurrence of `kibana-8.13.0-SNAPSHOT-linux-aarch64.tar.gz` from the repo above's step with the output of running build on this changeset. - before running step 4, modify the `kibana.yml` file from the `kibana-dev-docker` repo and include the following so we might be able to verify the version of chromium running; ```yaml logging.loggers: - name: plugins.reporting level: debug ``` - complete the steps outlined in the README, you'll have a linux distro of kibana running on port `5601` - Attempt creating exports of PDF and PNG reports, in dashboard, canvas, and visualizations, on report creation attempt we would see a log output that prints out the chromium version exactly matching this; <img width="1645" alt="Screenshot 2024-07-30 at 16 07 10" src="https://github.com/user-attachments/assets/930a05fa-385b-4429-89e8-7b846043be59"> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent cca1a3c commit 6a2d014

File tree

5 files changed

+109
-140
lines changed

5 files changed

+109
-140
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@
11411141
"pretty-ms": "6.0.0",
11421142
"prop-types": "^15.8.1",
11431143
"proxy-from-env": "1.0.0",
1144-
"puppeteer": "22.8.1",
1144+
"puppeteer": "22.13.1",
11451145
"query-string": "^6.13.2",
11461146
"rbush": "^3.0.1",
11471147
"re-resizable": "^6.9.9",

x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.test.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77

88
import os from 'os';
99
import { args } from './args';
10-
import { getChromiumPackage } from '../../../utils';
1110

1211
// Since chromium v111 headless mode in arm based macs is not working with `--disable-gpu`
1312
// This is a known issue: headless uses swiftshader by default and swiftshader's support for WebGL is currently disabled on Arm pending the resolution of https://issuetracker.google.com/issues/165000222.
14-
// As a workaround, we force hardware GL drivers on mac.
15-
// The best way to do this starting with v112 is by passing --enable-gpu,
16-
// v111 and older versions should work with --use-angle.
13+
// As a workaround, we pass --enable-gpu to stop forcing swiftshader, see https://issues.chromium.org/issues/40256775#comment4
1714
describe('headless webgl arm mac workaround', () => {
1815
const originalPlatform = process.platform;
1916
afterEach(() => {
@@ -37,21 +34,15 @@ describe('headless webgl arm mac workaround', () => {
3734
expect(flags.includes(`--disable-gpu`)).toBe(true);
3835
});
3936

40-
test("doesn't disable gpu when on an arm mac, adds --use-angle", () => {
37+
test("doesn't disable gpu when on an arm mac, adds --enable-gpu", () => {
4138
simulateEnv('darwin', 'arm64');
4239

4340
const flags = args({
4441
userDataDir: '/',
4542
proxy: { enabled: false },
4643
});
44+
4745
expect(flags.includes(`--disable-gpu`)).toBe(false);
48-
expect(flags.includes(`--use-angle`)).toBe(true);
49-
50-
// if you're updating this, then you're likely updating chromium
51-
// please double-check that the --use-angle flag is still needed for arm macs
52-
// instead of --use-angle you may need --enable-gpu
53-
expect(getChromiumPackage().binaryChecksum).toBe(
54-
'e5d4ccdbf3b66532c7c0973be2d5bbd3189079646ced55fe4db61d8e7e7bfc7e'
55-
); // just putting this here so that someone updating the chromium version will see this comment
46+
expect(flags.includes(`--enable-gpu`)).toBe(true);
5647
});
5748
});

x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,11 @@ export const args = ({
7373
flags.push('--no-sandbox');
7474
}
7575

76-
// Since chromium v111 headless mode in arm based macs is not working with `--disable-gpu`
76+
// Headless mode in arm based macs is not working with `--disable-gpu`
7777
// This is a known issue: headless uses swiftshader by default and swiftshader's support for WebGL is currently disabled on Arm pending the resolution of https://issuetracker.google.com/issues/165000222.
78-
// As a workaround, we force hardware GL drivers on mac: v111 and older versions should work with --use-angle.
79-
// The best way to do this when the issue is resolved will be to pass --enable-gpu,
78+
// As a workaround, we pass --enable-gpu to stop forcing swiftshader, see https://issues.chromium.org/issues/40256775#comment4
8079
if (os.arch() === 'arm64' && process.platform === 'darwin') {
81-
flags.push('--use-angle');
80+
flags.push('--enable-gpu');
8281
} else {
8382
flags.push('--disable-gpu');
8483
}

x-pack/plugins/screenshotting/server/browsers/chromium/paths.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ export class ChromiumArchivePaths {
4444
platform: 'darwin',
4545
architecture: 'x64',
4646
archiveFilename: 'chrome-mac.zip',
47-
archiveChecksum: 'f69bb2f5f402aa2bdd28ccab3a9b36857d1591a1f443fa5b8865df644805cb96',
48-
binaryChecksum: 'c6289a1a1d45021b2259ea0c9ae65ea37199452b5457831680a5e192a3f19add',
47+
archiveChecksum: 'fa8004f3c8c5574c089c901e48429d1b01720bf3dd25e05ac56c41d0ab470c10',
48+
binaryChecksum: '56f25cb6881e5c2b1aac0d8e87630517d1af8effdc9319d35f872add048df1ca',
4949
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
50-
revision: 1274550,
50+
revision: 1300317, // 1300313 is not available for Mac_x64
5151
location: 'common',
5252
archivePath: 'Mac',
5353
isPreInstalled: false,
@@ -56,44 +56,44 @@ export class ChromiumArchivePaths {
5656
platform: 'darwin',
5757
architecture: 'arm64',
5858
archiveFilename: 'chrome-mac.zip',
59-
archiveChecksum: '55d8cfe56d4461645a663de263ae670f78cc69b69aee16a62c47f361fa9a62f2',
60-
binaryChecksum: 'e5d4ccdbf3b66532c7c0973be2d5bbd3189079646ced55fe4db61d8e7e7bfc7e',
59+
archiveChecksum: 'bea49fd3ccd6aaccd7cdc4df38306f002a2934aaa2c044f3b5a3272b31ec77ca',
60+
binaryChecksum: '4c55d9e47deb1179c377c9785afdcdb5f3d3f351bff62b414d43e32ff195bd55',
6161
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
62-
revision: 1274557, // 1274542 is not available for Mac_Arm
62+
revision: 1300314, // 1300313 is not available for Mac_Arm
6363
location: 'common',
6464
archivePath: 'Mac_Arm',
6565
isPreInstalled: false,
6666
},
6767
{
6868
platform: 'linux',
6969
architecture: 'x64',
70-
archiveFilename: 'chromium-46cf136-locales-linux_x64.zip',
71-
archiveChecksum: '8ea5f2d72352230f7927725a6ffd6d5fb462a0c8ad76e320003748b62df6d221',
72-
binaryChecksum: 'e7f8109ef7535dab500166b335524dfa4e92324fa31a2a61f510a5fa5afc2eee',
70+
archiveFilename: 'chromium-5b5d829-locales-linux_x64.zip',
71+
archiveChecksum: '799e8fd5f47ea70b8a3972d39b2617c9cbebc7fc433a89251dae312a7c77534b',
72+
binaryChecksum: '216b8f7ff9b41e985397342c2df54e4f8e07a01a3b8a929f39b9a10931d26ff5',
7373
binaryRelativePath: 'headless_shell-linux_x64/headless_shell',
74-
revision: 1274542,
74+
revision: 1300313,
7575
location: 'custom',
7676
isPreInstalled: true,
7777
},
7878
{
7979
platform: 'linux',
8080
architecture: 'arm64',
81-
archiveFilename: 'chromium-46cf136-locales-linux_arm64.zip',
82-
archiveChecksum: '7d01fe8a78a019cf714c913d37353f85d54c4c7d4fde91d6c96605d259a66414',
83-
binaryChecksum: 'd1a8b8708dc5ced8a9c526a0d823a4074325573f9c06fabe14e18fd3a36691c9',
81+
archiveFilename: 'chromium-5b5d829-locales-linux_arm64.zip',
82+
archiveChecksum: '961e20c45c61f8e948efdc4128bb17c23217bbcb28537f270ccf5bf0826981e7',
83+
binaryChecksum: 'fc4027fb6b1c96bef9374d5d9f791097fae2ec2ddc4e0134167075bd52d1458f',
8484
binaryRelativePath: 'headless_shell-linux_arm64/headless_shell',
85-
revision: 1274542,
85+
revision: 1300313,
8686
location: 'custom',
8787
isPreInstalled: true,
8888
},
8989
{
9090
platform: 'win32',
9191
architecture: 'x64',
9292
archiveFilename: 'chrome-win.zip',
93-
archiveChecksum: 'd5e9691fb9d378ae13c8956be0d9eb45674d033e8b38125ace2f2fdd458e5ca0',
94-
binaryChecksum: '4d8f95e4f218fc3010ab2f0d8f8674f16d554622218e73f9a7c8a22dbba2e078',
93+
archiveChecksum: '27a2ed1473cefc6f48ff5665faa1fbcc69ef5be47ee21777a60e87c8379fdd93',
94+
binaryChecksum: 'd603401a5e6f8bd734b329876e4221a4d24a1999f14df6e32eeb5e6a72520d96',
9595
binaryRelativePath: path.join('chrome-win', 'chrome.exe'),
96-
revision: 1274557,
96+
revision: 1300320, // 1300313 is not available for win32
9797
location: 'common',
9898
archivePath: 'Win',
9999
isPreInstalled: true,

0 commit comments

Comments
 (0)