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 2020/03/16 16:33:42 UTC

[GitHub] [incubator-superset] mistercrunch opened a new pull request #7716: [WiP] feat: backend for thumnail computation + caching + endpoints

mistercrunch opened a new pull request #7716: [WiP] feat: backend for thumnail computation + caching + endpoints
URL: https://github.com/apache/incubator-superset/pull/7716
 
 
   This PR is the backend subset of WiP PR #6601. It includes:
   
   * refactor of the Selenium abstractions used for email schedules,
     generalized to also work with thumbs
   * new dependency on PIL, the common way of doing image processing in
     python, we use it to resize selenium screenshots into thumbs
   * CLI utilities to compute-thumbnails
   * the addition of an extra caching backend for thumbnail, in most cases
     we assume it should point to the same backend as the one used for
     chart JSON caching
   * 2 new endpoints to retrieve dashboard and chart thumbs
   
   ### CATEGORY
   
   Choose one### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### TODO / extra thoughts
   - The security on viewing thumbnails should be the same as viewing the chart/dashboard itself
   - We should perf/load test viewing a pageful of thumbnail. Assuming ~50 thumbs are displayed on a card list view, how does the metadata database react? It can represent a fair amount of database lookups depending on the way that perms are setup (if the user is Gamma, and there are lots of dashboards on the system). We should make sure that the worst case is ok.
   - Caching for thumbs can be lax (doesn't have to be done daily for instance), but it's different for the image service (say for Slack or email scheduled delivery). Caching for thumb is currently forced on save events (async, and that's the way we'd tell users to get a new fresh thumb), or we could add a feature to force on the endpoint. There's also the CLI. For caching for other purposes, I think that the caching policy for charts should apply for the image the same way as it does for the JSON caching (same logic/policy).
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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