Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade screenshotting Chromium and Puppeteer to v15 #140072

Closed
wants to merge 39 commits into from

Conversation

vadimkibana
Copy link
Contributor

@vadimkibana vadimkibana commented Sep 6, 2022

Summary

  • Upgrades Puppeteer to v15
  • Upgrades Chromium build to the latest one with which Puppeteer v15 works
    • user-agent: Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/105.0.5173.0 Safari/537.36

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@vadimkibana vadimkibana added the ci:cloud-deploy Create or update a Cloud deployment label Sep 6, 2022
@vadimkibana vadimkibana added the ci:cloud-redeploy Always create a new Cloud deployment label Sep 7, 2022
@jbudz
Copy link
Member

jbudz commented Sep 7, 2022

buildkite test this

@vadimkibana vadimkibana marked this pull request as ready for review September 8, 2022 09:04
@vadimkibana vadimkibana added release_note:skip Skip the PR/issue when compiling release notes Team:AppServicesUx labels Sep 8, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServicesUx)

@vadimkibana vadimkibana changed the title Puppeteer 3 Upgrade screenshotting Chromium and Puppeteer to v15 Sep 8, 2022
@vadimkibana vadimkibana requested review from jloleysens, tsullivan and dokmic and removed request for jloleysens and tsullivan September 8, 2022 09:12
@vadimkibana
Copy link
Contributor Author

@elasticmachine merge upstream

@tsullivan
Copy link
Member

tsullivan commented Sep 15, 2022

I pulled some error message text from a debug file by doing the following:

  • add --enable-logging=headless_shell_debug.log and --v=1 to the args in x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/args.ts
  • run a PNG report job
  • check the headless_shell_debug.log file under x-pack/plugins/screenshotting/chromium/headless_shell-linux_arm64
kibana@6bdf1666479e:~$ grep error x-pack/plugins/screenshotting/chromium/headless_shell-linux_arm64/headless_debug.log
[0915/183613.592250:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[0915/183613.611891:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[0915/183613.624378:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[0915/183613.632936:ERROR:angle_platform_impl.cc(43)] Display.cpp:992 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1358.
[0915/183613.633057:ERROR:gl_display.cc(506)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-3): Initialization of an object could not be completed for implementation-specific reasons, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1358.
[0915/183613.633113:ERROR:gl_display.cc(879)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[0915/183613.641066:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization

My guess is the build is missing lib dependencies for Vulkan. I plan to update the build script with something similar to lines 227-241 here.

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this as the .zip files have been updated with the vulkan libs they need for software rasterization without GPU to work.

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before merging, let's investigate the cloud issue (timing out). I'll take a look probably tomorrow.

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not merge before resolving timeouts on cloud. I'll take a look tomorrow.

@streamich
Copy link
Contributor

@elasticmachine merge upstream

@vadimkibana
Copy link
Contributor Author

vadimkibana commented Sep 19, 2022

I've tested it on Ubuntu 20, and can verify that:

  • It downloads the updated chromium-4440632-locales-linux_x64.zip build.
  • It generates dashboard print optimized PDF report with page numbers.
  • It generates dashboard PDF report with page number, but it timed out on my first try.
  • It generates dashboard PNG report.

@vadimkibana
Copy link
Contributor Author

@elasticmachine merge upstream

@vadimkibana
Copy link
Contributor Author

I think we should not merge before resolving timeouts on cloud. I'll take a look tomorrow.

Do you think cloud timeouts are related to Chromium upgrade, or PDF generation in general? I thought it generates PNG reports consistently, my guess is maybe there is some problem specific to PDFs.

@tsullivan tsullivan requested a review from a team as a code owner September 19, 2022 23:39
Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know where the extra 20mb added to our distribution size is coming from? I don't want to block merging, but I hope we can circle back on this. Chromium + fonts + pdf + img libs account for about half of Kibana's download size. If we need it all that's fine, I'm just hoping we can double check if there's room for improvement.

@tsullivan tsullivan mentioned this pull request Sep 20, 2022
@tsullivan
Copy link
Member

Hi @jbudz for reference, here are the sizes of the bundled binary files for linux.

Sep 15 19:06  272M headless_shell-linux_arm64/headless_shell
Sep 15 18:45  444K headless_shell-linux_arm64/libEGL.so
Sep 15 18:45   14M headless_shell-linux_arm64/libGLESv2.so
Sep 15 18:44   25M headless_shell-linux_arm64/libvk_swiftshader.so
Sep 15 18:45  910K headless_shell-linux_arm64/libvulkan.so.1
Sep 20 11:08   96B headless_shell-linux_arm64/locales
Sep 15 20:17  6.7K headless_shell-linux_arm64/locales/en-US.pak
Sep 15 18:44  107B headless_shell-linux_arm64/vk_swiftshader_icd.json
             
Sep 15 20:50  189M headless_shell-linux_x64/headless_shell
Sep 15 20:30  390K headless_shell-linux_x64/libEGL.so
Sep 15 20:30   13M headless_shell-linux_x64/libGLESv2.so
Sep 15 20:28  6.1M headless_shell-linux_x64/libvk_swiftshader.so
Sep 15 20:29  824K headless_shell-linux_x64/libvulkan.so.1
Sep 20 11:10   96B headless_shell-linux_x64/locales
Sep 15 20:50  6.7K headless_shell-linux_x64/locales/en-US.pak
Sep 15 20:29  107B headless_shell-linux_x64/vk_swiftshader_icd.json

The previous sizes were:

Oct 15  2021  199M headless_shell-linux_arm64/headless_shell
May  5 02:34   96B headless_shell-linux_arm64/locales
May  5 02:34  6.7K headless_shell-linux_arm64/locales/en-US.pak
May  5 02:33  128B headless_shell-linux_arm64/swiftshader
Oct 15  2021  418K headless_shell-linux_arm64/swiftshader/libEGL.so
Oct 15  2021   22M headless_shell-linux_arm64/swiftshader/libGLESv2.so
             
May  5 01:14  145M headless_shell-linux_x64/headless_shell
May  5 01:14   96B headless_shell-linux_x64/locales
May  5 01:14  6.7K headless_shell-linux_x64/locales/en-US.pak
May  5 01:14  128B headless_shell-linux_x64/swiftshader
May  5 01:14  382K headless_shell-linux_x64/swiftshader/libEGL.so
May  5 01:14  3.4M headless_shell-linux_x64/swiftshader/libGLESv2.so

The reason for the replacement of swiftshader with libvulkan appears related to

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 22, 2022

💔 Build Failed

Failed CI Steps

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@tsullivan
Copy link
Member

All of the changes related to build-improvement are handled in this PR: #143022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:cloud-deploy Create or update a Cloud deployment ci:cloud-redeploy Always create a new Cloud deployment release_note:skip Skip the PR/issue when compiling release notes v7.17.7 v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants