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

fix(reports): Update the element class to wait for when taking a screenshot #28745

Merged
merged 2 commits into from
May 29, 2024

Conversation

Vitor-Avila
Copy link
Contributor

SUMMARY

In the process of taking screenshots for an alert/report, Selenium/Playwright is configured to wait a certain time (controlled via superset_config.py) until all chart elements are drawn. The logic was configured to monitor the slice_container class, however with #27255 this class is only used once the chart data is retrieved.

This PR changes the class to be monitored to the chart-container wrapper.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

No UI changes.

TESTING INSTRUCTIONS

  1. Configure SCREENSHOT_LOCATE_WAIT to be 30 seconds, and SCREENSHOT_LOAD_WAIT to be 200 seconds.
  2. Create a chart that takes longer than 30 seconds to load. You can use pg_sleep() with Postgres for example.
  3. Configure a report with this chart.

Before this PR the report would fail, as the chart wouldn't load within 30 seconds.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dosubot dosubot bot added the alert-reports Namespace | Anything related to the Alert & Reports feature label May 28, 2024
Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 83.47%. Comparing base (76d897e) to head (f8b39a9).
Report is 235 commits behind head on master.

Files Patch % Lines
superset/utils/webdriver.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #28745       +/-   ##
===========================================
+ Coverage   60.48%   83.47%   +22.98%     
===========================================
  Files        1931      523     -1408     
  Lines       76236    37575    -38661     
  Branches     8568        0     -8568     
===========================================
- Hits        46114    31365    -14749     
+ Misses      28017     6210    -21807     
+ Partials     2105        0     -2105     
Flag Coverage Δ
hive 49.01% <0.00%> (-0.16%) ⬇️
javascript ?
mysql 77.12% <0.00%> (?)
postgres 77.23% <0.00%> (?)
presto 53.56% <0.00%> (-0.25%) ⬇️
python 83.47% <0.00%> (+19.98%) ⬆️
sqlite 76.68% <0.00%> (?)
unit 58.94% <0.00%> (+1.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

LGTM

@rusackas rusackas merged commit 020c799 into apache:master May 29, 2024
34 checks passed
@michael-s-molina michael-s-molina added the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label May 30, 2024
michael-s-molina pushed a commit that referenced this pull request May 30, 2024
EnxDev pushed a commit to EnxDev/superset that referenced this pull request May 31, 2024
eschutho pushed a commit that referenced this pull request Jun 5, 2024
@mistercrunch mistercrunch added 🍒 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert-reports Namespace | Anything related to the Alert & Reports feature 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 4.0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants