You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2023/01/06 01:22:01 UTC

[GitHub] [superset] lyndsiWilliams opened a new pull request, #22614: fix: Report screenshot cut off on left and right sides

lyndsiWilliams opened a new pull request, #22614:
URL: https://github.com/apache/superset/pull/22614

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   This PR fixes report screenshot width. Screenshots were being cut off on the left and right. I fixed this by having the screenshot capture by class `standalone` and removing the filter bar when `standalone=3`.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   #### BEFORE:
   ![reportBefore](https://user-images.githubusercontent.com/55605634/210910175-47050578-2a38-4b3e-a91a-eb684fd41283.png)
   
   #### AFTER:
   ![reportAfter](https://user-images.githubusercontent.com/55605634/210910259-344ccff9-e969-45a1-8c4c-a0901aba6fd1.png)
   
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   - Add a report and set the notification method to email
     - Set it to send every minute for quicker testing
   - Check your email
   - Ensure that the report is properly bordered on the left and right
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #22614: fix: Report screenshot cut off on left and right sides

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #22614:
URL: https://github.com/apache/superset/pull/22614#issuecomment-1373012830

   # [Codecov](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#22614](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8b4cd90) into [master](https://codecov.io/gh/apache/superset/commit/db201804aeaba232cb2eef4e3554278567032513?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db20180) will **decrease** coverage by `11.08%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #22614       +/-   ##
   ===========================================
   - Coverage   67.00%   55.91%   -11.09%     
   ===========================================
     Files        1859     1859               
     Lines       71036    71036               
     Branches     7766     7766               
   ===========================================
   - Hits        47597    39722     -7875     
   - Misses      21417    29292     +7875     
     Partials     2022     2022               
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `52.47% <100.00%> (ø)` | |
   | postgres | `?` | |
   | presto | `52.37% <100.00%> (ø)` | |
   | python | `58.16% <100.00%> (-23.16%)` | :arrow_down: |
   | sqlite | `?` | |
   | unit | `51.47% <100.00%> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/components/DashboardBuilder/DashboardBuilder.tsx](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0Rhc2hib2FyZEJ1aWxkZXIvRGFzaGJvYXJkQnVpbGRlci50c3g=) | `73.58% <ø> (ø)` | |
   | [superset/utils/screenshots.py](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvc2NyZWVuc2hvdHMucHk=) | `31.30% <100.00%> (-17.40%)` | :arrow_down: |
   | [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset/tags/core.py](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdGFncy9jb3JlLnB5) | `4.54% <0.00%> (-95.46%)` | :arrow_down: |
   | [superset/key\_value/commands/update.py](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
   | [superset/key\_value/commands/delete.py](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZS5weQ==) | `0.00% <0.00%> (-87.88%)` | :arrow_down: |
   | [superset/key\_value/commands/delete\_expired.py](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZV9leHBpcmVkLnB5) | `0.00% <0.00%> (-84.00%)` | :arrow_down: |
   | [superset/dashboards/commands/importers/v0.py](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy9pbXBvcnRlcnMvdjAucHk=) | `15.62% <0.00%> (-76.25%)` | :arrow_down: |
   | [superset/datasets/commands/create.py](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvY3JlYXRlLnB5) | `30.61% <0.00%> (-69.39%)` | :arrow_down: |
   | [superset/datasets/commands/update.py](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvdXBkYXRlLnB5) | `25.00% <0.00%> (-69.05%)` | :arrow_down: |
   | ... and [287 more](https://codecov.io/gh/apache/superset/pull/22614?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on pull request #22614: fix: Report screenshot cut off on left and right sides

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on PR #22614:
URL: https://github.com/apache/superset/pull/22614#issuecomment-1402026874

   @lyndsiWilliams I believe this PR has caused a regression for dashboard thumbnails. When rendering dashboard thumbnails, I'm now getting the following timeout error:
   
   ```
   Caching dashboard: http://localhost:8088/superset/dashboard/10/
   Processing url for thumbnail: b59b6650f84da2dfa80e5c6a10ba69bc
   Init selenium driver
   Selenium timed out requesting url http://localhost:8088/superset/dashboard/10/
   Traceback (most recent call last):
     File "/Users/ville/apple/apache-superset/superset/utils/webdriver.py", line 177, in get_screenshot
       element = WebDriverWait(driver, self._screenshot_locate_wait).until(
     File "/Users/ville/apple/apache-superset/venv38/lib/python3.8/site-packages/selenium/webdriver/support/wait.py", line 80, in until
       raise TimeoutException(message, screen, stacktrace)
   selenium.common.exceptions.TimeoutException: Message:
   ```
   
   In this PR we're assuming that dashboards are always being rendered with the `standalone` flag, but apparently that's only true for alerts & reports. See the logic for dashboard reports (See `standalone` being set to `DashboardStandaloneMode.REPORT.value`):
   https://github.com/apache/superset/blob/3e07de7f39a1e6ee9d0db43435ce4a7285003a79/superset/reports/commands/execute.py#L189-L196
   Contrast that with dashboard thumbnails (notice the missing `standalone` kwarg): https://github.com/apache/superset/blob/3e07de7f39a1e6ee9d0db43435ce4a7285003a79/superset/tasks/thumbnails.py#L85
   
   It might be a good idea to create a util for generating the chart and dashboard URLs to ensure we're always using the same logic for alerts, reports and thumbs. Thoughts?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] github-actions[bot] commented on pull request #22614: fix: Report screenshot cut off on left and right sides

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #22614:
URL: https://github.com/apache/superset/pull/22614#issuecomment-1385827682

   Ephemeral environment shutdown and build artifacts deleted.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] github-actions[bot] commented on pull request #22614: fix: Report screenshot cut off on left and right sides

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #22614:
URL: https://github.com/apache/superset/pull/22614#issuecomment-1374061626

   @eschutho Ephemeral environment spinning up at http://54.185.134.130:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] eschutho commented on pull request #22614: fix: Report screenshot cut off on left and right sides

Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho commented on PR #22614:
URL: https://github.com/apache/superset/pull/22614#issuecomment-1423014855

   >It might be a good idea to create a util for generating the chart and dashboard URLs to ensure we're always using the same logic for alerts, reports and thumbs. Thoughts?
   
   Thanks for catching this error @villebro! I took your suggestion in https://github.com/apache/superset/pull/23003 and wound up moving the standalone logic closer to the screenshot classes that define the element to capture. I'd love to get your thoughts on that approach. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] lyndsiWilliams merged pull request #22614: fix: Report screenshot cut off on left and right sides

Posted by GitBox <gi...@apache.org>.
lyndsiWilliams merged PR #22614:
URL: https://github.com/apache/superset/pull/22614


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] eschutho commented on pull request #22614: fix: Report screenshot cut off on left and right sides

Posted by GitBox <gi...@apache.org>.
eschutho commented on PR #22614:
URL: https://github.com/apache/superset/pull/22614#issuecomment-1374059998

   /testenv up


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org