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 2018/11/20 02:26:26 UTC

[GitHub] graceguo-supercat opened a new issue #6414: URL Shortner for chart didn't work as expected

graceguo-supercat opened a new issue #6414: URL Shortner for chart didn't work as expected
URL: https://github.com/apache/incubator-superset/issues/6414
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   
   ### Superset version
   0.28
   
   ### Expected results
   display chart
   
   ### Actual results
   502 Gateway error
   
   ### Steps to reproduce
   Airbnb has many charts that used very complicated adhoc filters, which makes form_data (parameters dict) very large, and makes its encoded string > 2k characters. Most nginx or browser has length limit on url length. If url request is too long, server will response with 502 Bad Gateway error. 
   
   PR #3993 use `/explore?r=url_id` format to generated shorten url. The actual query parameters are sent from following POST request (instead of shorten url itself).  When #4760 introduced shorten url to dashboard link, all shorten url used same format `/r/url_id` for both dashboard and explore view, and redirect shorten url to actual long url (with full parameters), this cause request url too long.
   
   Proposed fix:
   solution 1:
   - generate `/explore?r=url_id` for chart, `/dashboard?r=url_id` for dashboard.
   - explore view already had logic handle r parameter, just need to add similar logic for /dashboard endpoint
   
   solution 2:
   - still use same shorten url format for both dashboard and explore: `/r/url_id`
   - In '/<url_id>' endpoint, add logic: 
     - if dashboard just redirect to the saved long url. if 
     - if explore view, redirect to `explore?r=url_id`
   @mistercrunch 
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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