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 2022/01/05 18:10:08 UTC

[GitHub] [superset] graceguo-supercat commented on a change in pull request #17895: fix: make cache warm up work again

graceguo-supercat commented on a change in pull request #17895:
URL: https://github.com/apache/superset/pull/17895#discussion_r779033149



##########
File path: superset/tasks/cache.py
##########
@@ -72,15 +73,15 @@ def get_form_data(
     return form_data
 
 
-def get_url(chart: Slice, extra_filters: Optional[Dict[str, Any]] = None) -> str:
+def get_url(chart: Slice) -> str:
     """Return external URL for warming up a given chart/table cache."""
     with app.test_request_context():
         baseurl = (
             "{SUPERSET_WEBSERVER_PROTOCOL}://"
             "{SUPERSET_WEBSERVER_ADDRESS}:"
             "{SUPERSET_WEBSERVER_PORT}".format(**app.config)
         )
-        return f"{baseurl}{chart.get_explore_url(overrides=extra_filters)}"
+        return f"{baseurl}/superset/warm_up_cache/?slice_id={chart.id}"

Review comment:
       this change will cause potential feature regression. This endpoint, get_url, used to accept extra_filters, so that it will hit slice with extra filters (like user open slice from Dashboard).
   
   After your change, get_url can only send query based on saved params from slice, but user that already used this API will send wrong requests (since you dropped extra_filters)




-- 
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