You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "john-bodley (via GitHub)" <gi...@apache.org> on 2023/04/03 22:51:36 UTC

[GitHub] [superset] john-bodley commented on a diff in pull request #23569: fix(warm_up_cache): JSON serialization

john-bodley commented on code in PR #23569:
URL: https://github.com/apache/superset/pull/23569#discussion_r1156521953


##########
tests/integration_tests/core_tests.py:
##########
@@ -603,6 +608,26 @@ def test_warm_up_cache(self):
             + quote(json.dumps([{"col": "name", "op": "in", "val": ["Jennifer"]}]))
         ) == [{"slice_id": slc.id, "viz_error": None, "viz_status": "success"}]
 
+    @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
+    @mock.patch.object(ChartDataCommand, "run")
+    def test_warm_up_cache_error(self, run_mock) -> None:
+        self.login()
+        slc = self.get_slice("Pivot Table v2", db.session)

Review Comment:
   Another sad byproduct of [having multiple ways of doing things](https://github.com/apache/superset/blob/95db6c04aaec388210a30eed70e927ebe2484f9c/superset/views/core.py#L1749-L1775). The `Empty query?` is handled differently depending on whether or not the slice has a query context defined as it seems other paths wont raise, i.e., the error is stringified via the `str` function.



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