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

[SLO][Embeddable] Fix Kibana reporting screenshot issue #169929

Merged
merged 5 commits into from
Nov 1, 2023

Conversation

mgiota
Copy link
Contributor

@mgiota mgiota commented Oct 26, 2023

Resolves #169716

🍒 Summary

The reporting plugin waits for a renderComplete signal when the embeddable has finished loading any data and is correctly rendered so the headless Chromium can take a screenshot. This PR calls the RenderCompleteDispatcher on the SLO Overview embeddable when all the child components have finished loading.

https://elastic.slack.com/archives/CFFQ7RP9B/p1614267987040400

How to test

  • Add an SLO panel to the dashboard
  • click on share -> PDF reports > Generate PDF on the top right navigation bar
  • No Timeout error should appear on the generated PDF
Screenshot 2023-10-26 at 15 05 05

@mgiota mgiota self-assigned this Oct 26, 2023
@mgiota mgiota requested a review from a team as a code owner October 26, 2023 12:53
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@mgiota mgiota added release_note:fix release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" and removed release_note:fix labels Oct 26, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@mgiota mgiota force-pushed the fix_slo_reporting_issue branch from bad3931 to 44ff9aa Compare October 26, 2023 13:10
this.node = node;
// required for the export feature to work
this.node.setAttribute('data-shared-item', '');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed according to this. Otherwise reporting wouldn't work

Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

Just a concern about calling the callback without a useEffect, but we need to validate my assumption before

Comment on lines 106 to 108
if (!isLoading) {
onRenderComplete();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 I wonder if this is not triggered at every rerender? One way to check would be to console log something here.

@mgiota mgiota requested a review from kdelemme October 26, 2023 19:03
@mgiota mgiota force-pushed the fix_slo_reporting_issue branch from 95fd0ca to 460f050 Compare October 26, 2023 20:14
@mgiota mgiota force-pushed the fix_slo_reporting_issue branch from 460f050 to 01dcbcc Compare October 26, 2023 21:18
Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

👍🏻 Thanks for the change

@mgiota
Copy link
Contributor Author

mgiota commented Nov 1, 2023

@elasticmachine merge upstream

@mgiota mgiota force-pushed the fix_slo_reporting_issue branch from c9c9fd8 to e2ba41e Compare November 1, 2023 20:03
@mgiota
Copy link
Contributor Author

mgiota commented Nov 1, 2023

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #34 / EPM Endpoints EPM - list list api tests lists all limited packages from the registry

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 1.1MB 1.1MB +264.0B

History

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

cc @mgiota

@mgiota mgiota merged commit 18dc8fe into elastic:main Nov 1, 2023
28 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 1, 2023
delanni pushed a commit to delanni/kibana that referenced this pull request Nov 6, 2023
Resolves elastic#169716

## 🍒 Summary
The reporting plugin waits for a renderComplete signal when the
embeddable has finished loading any data and is correctly rendered so
the headless Chromium can take a screenshot. This PR calls the
RenderCompleteDispatcher on the SLO Overview embeddable when all the
child components have finished loading.

https://elastic.slack.com/archives/CFFQ7RP9B/p1614267987040400

## How to test

- Add an SLO panel to the dashboard
- click on share -> PDF reports > Generate PDF on the top right
navigation bar
- No Timeout error should appear on the generated PDF

<img width="1407" alt="Screenshot 2023-10-26 at 15 05 05"
src="https://github.com/elastic/kibana/assets/2852703/45c2c868-edbe-426e-bc05-5794c2bfa91e">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@mgiota mgiota added the Team:obs-ux-management Observability Management User Experience Team label Nov 14, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" Team:obs-ux-management Observability Management User Experience Team v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SLO panel in dashboard breaks Kibana reporting with screenshotting encountering a timeout error
6 participants