elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.77k stars 8.17k forks source link

[Reporting/Screenshotting] Backport screenshotting plugin to 7.17 #187512

Closed tsullivan closed 1 month ago

tsullivan commented 3 months ago

This issue is to backport https://github.com/elastic/kibana/pull/120110 to the 7.17 branch.

Why we want to do this: in keeping Puppeteer and Chromium up-to-date to support Kibana Reporting, we routinely spend a lot of time re-doing the Puppeteer changes in the 7.17 branch. Due to https://github.com/elastic/kibana/pull/120110 not having been backported, the changes from main can't easily be carried back.

Backporting https://github.com/elastic/kibana/pull/120110 to the 7.17 branch will allow us to move more quickly on keeping Chromium and Puppeteer up-to-date.

elasticmachine commented 3 months ago

Pinging @elastic/appex-sharedux (Team:SharedUX)

tsullivan commented 2 months ago

I explored the feasibility of re-implementing the same change to main that split out the screenshotting functionality from Reporting plugin. Doing a change like this in 7.17 is prohibitively complex, as the screenshotting plugin has binding with Kibana build tasks. It is also complex for other reasons, as it has a "public" layer of code, it includes translations, test helpers, and mocks.

I investigated the extent we can ease the headache of manual backport by looking at the types of changes we currently manually backport when Chromium is updated. Example.

  1. The paths.ts and args.test.ts files have a different location in main and 7.17.
  2. We should move paths.ts, args.test.ts and args.ts files to a new package.
  3. Implement the package in main and 7.17 so that the files have the same location in both branches.

While this will ease the headache of manual backports, it won't solve it. For every backport there also is a change to the yarn.lock file and manual backports will be required there.

tsullivan commented 1 month ago

Replaced with https://github.com/elastic/kibana/pull/188390 and https://github.com/elastic/kibana/pull/190950