-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Screenshotting] Add captureBeyondViewport: false to workaround a res… #131877
[Screenshotting] Add captureBeyondViewport: false to workaround a res… #131877
Conversation
9d83b19
to
c6969c3
Compare
093d47a
to
38167c0
Compare
…ize bug in Puppeteer
commit 9e5c688aefb9ff725a38b3c43402dfb96550a96a Author: Timothy Sullivan <tsullivan@elastic.co> Date: Fri May 6 14:56:11 2022 -0700 get real commit c05056e69145a1ad2e95f112b3987f2e88ba9408 Merge: 846ae81 8aa9241 Author: Timothy Sullivan <tsullivan@elastic.co> Date: Fri May 6 14:15:36 2022 -0700 Merge remote-tracking branch 'elastic/main' into reporting/ks-2573 commit 846ae81 Merge: 64b4c33 99c659c Author: Timothy Sullivan <tsullivan@elastic.co> Date: Wed May 4 19:28:17 2022 -0700 Merge remote-tracking branch 'elastic/main' into reporting/ks-2573 commit 64b4c33 Merge: efa88c3 1cdf0a4 Author: Tim Sullivan <tsullivan@users.noreply.github.com> Date: Wed May 4 11:08:44 2022 -0700 Merge branch 'main' into reporting/ks-2573 commit efa88c3 Author: Timothy Sullivan <tsullivan@elastic.co> Date: Wed May 4 11:07:47 2022 -0700 higher visualize png check threshold commit 8e76398 Merge: 366a28a 47f4658 Author: Timothy Sullivan <tsullivan@elastic.co> Date: Wed May 4 11:04:47 2022 -0700 Merge remote-tracking branch 'elastic/main' into reporting/ks-2573 commit 366a28a Author: Timothy Sullivan <tsullivan@elastic.co> Date: Wed May 4 10:52:32 2022 -0700 add visualize test for tsvb commit 7c7e00d Author: Timothy Sullivan <tsullivan@elastic.co> Date: Tue May 3 19:06:42 2022 -0700 add new test for kibana 7.6 sample data commit 25319dd Author: Timothy Sullivan <tsullivan@elastic.co> Date: Tue May 3 17:07:25 2022 -0700 add test fixtures for 7.6 dashboard
67d06a8
to
5ab1168
Compare
@@ -227,5 +261,57 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { | |||
await kibanaServer.uiSettings.replace({}); | |||
}); | |||
}); | |||
|
|||
describe('Sample data from Kibana 7.6', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test adds sample data that was saved and imported in 7.6, as according to the original bug, the types of visualizations here tend to highlight the race condition more than Lens visualizations.
Pinging @elastic/kibana-app-services (Team:AppServicesUx) |
About the TSVB problem - when setting the viewport before calling the screenshot method the full panel would be captured for me: #131605 (comment) (it introduced a new issue of blurriness, not sure what that's about) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything LGTM! That's a fantastic job 👍
💚 Build SucceededMetrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Added the |
@tsullivan It seems like this PR missed the 7.17.4 build: This is the last commit that went into 7.17.4: https://github.com/elastic/kibana/commits/a408358a8fc5671f5eb7985678a1733684441b37 This is the commit merging the reporting fix into the 7.17 branch: 4dd9bf1
|
I see that it also didnt make it into v8.2.2 |
@bataya0 I have downloaded the Docker build of 8.2.2 and tested it out. One of the symptoms of this bug was, you could not run a PDF/PNG report from TSVB editor, and I verified this test case. I also viewed the script code in the docker container to make sure it has the latest code, and it does. Maybe you are having a different issue? |
In v8.2.2 when viewing a TSVB item, I can still generate PDF and PNG successfully, so I guess the fix is in v8.2.2 even though the tag for v8.2.2 isnt on this pull request. |
@bataya0 it looks like I needed to correct the version labels here. Done. Thanks for the heads up! |
Summary
Closes #131111
captureBeyondViewport flag
This adds
captureBeyondViewport: false
to our call of Puppeteer's Page.screenshot function to work around a bug that triggers an implicit resize inside of Puppeteer when we call that method.From the Puppeteer docs:
Adding this flag is high risk, because any part of the page that isn't contained in the viewport will be invisible. This can lead to screenshots that are cut-off or blank. This PR avoids that problem by doing a final resize of the viewport, to ensure that it includes the element to capture, before the screenshot is captured.
Checklist
Release Note
Fixed an issue in PDF/PNG reporting where visualization panels could sometimes appear blank.