You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "eschutho (via GitHub)" <gi...@apache.org> on 2024/04/12 20:59:21 UTC

[PR] fix: bump client side chart timeouts to 5 minutes [superset]

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

   <!---
   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 -->
   We're seeing a lot of client side timeouts in annotation layers and for the chart/data endpoints. I'm not sure why we had the timeout set to only 1 minute, since the chart/data endpoints are traditionally some of the longest running queries. 
   <img width="890" alt="Screenshot 2024-04-12 at 1 58 22 PM" src="https://github.com/apache/superset/assets/5186919/9a0674f3-f665-469c-a441-2ac9185bc1ef">
   
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually 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:
   - [ ] 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


Re: [PR] fix: bump client side chart timeouts to 5 minutes [superset]

Posted by "craig-rueda (via GitHub)" <gi...@apache.org>.
craig-rueda commented on code in PR #28018:
URL: https://github.com/apache/superset/pull/28018#discussion_r1563270932


##########
superset-frontend/src/components/Chart/chartAction.js:
##########
@@ -248,7 +248,7 @@ export async function getChartDataRequest({
 
 export function runAnnotationQuery({
   annotation,
-  timeout = 60,
+  timeout = 300,

Review Comment:
   Yea, would be nice to make this a config :) 



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


Re: [PR] fix: bump client side chart timeouts to 5 minutes [superset]

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on code in PR #28018:
URL: https://github.com/apache/superset/pull/28018#discussion_r1563263564


##########
superset-frontend/src/components/Chart/chartAction.js:
##########
@@ -248,7 +248,7 @@ export async function getChartDataRequest({
 
 export function runAnnotationQuery({
   annotation,
-  timeout = 60,
+  timeout = 300,

Review Comment:
   +1 on putting this in config such that we can see timeouts in one place and if someone wants to configure it for their instance they just have to update in config.py vs having to find all places and update it there.



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


Re: [PR] fix: bump client side chart timeouts to 5 minutes [superset]

Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho commented on code in PR #28018:
URL: https://github.com/apache/superset/pull/28018#discussion_r1563276086


##########
superset-frontend/src/components/Chart/chartAction.js:
##########
@@ -248,7 +248,7 @@ export async function getChartDataRequest({
 
 export function runAnnotationQuery({
   annotation,
-  timeout = 60,
+  timeout = 300,

Review Comment:
   kk, I'll make that change then. 👍 



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


Re: [PR] fix: bump client side chart timeouts to 5 minutes [superset]

Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho commented on code in PR #28018:
URL: https://github.com/apache/superset/pull/28018#discussion_r1563202262


##########
superset-frontend/src/components/Chart/chartAction.js:
##########
@@ -248,7 +248,7 @@ export async function getChartDataRequest({
 
 export function runAnnotationQuery({
   annotation,
-  timeout = 60,
+  timeout = 300,

Review Comment:
   Another option is for us to make this timeout configurable in config.py like we do with the server timeouts. 



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


Re: [PR] fix: bump client side chart timeouts to use the SUPERSET_WEBSERVER_TIMEOUT [superset]

Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho merged PR #28018:
URL: https://github.com/apache/superset/pull/28018


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


Re: [PR] fix: bump client side chart timeouts to use the SUPERSET_WEBSERVER_TIMEOUT [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #28018:
URL: https://github.com/apache/superset/pull/28018#discussion_r1564185176


##########
superset-frontend/src/components/Chart/chartAction.js:
##########
@@ -248,7 +248,7 @@ export async function getChartDataRequest({
 
 export function runAnnotationQuery({
   annotation,
-  timeout = 60,
+  timeout = 300,

Review Comment:
   ~~Would it be sensible to use one of the existing timeout configs rather than adding a new one?~~
   N/M, you did!



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


Re: [PR] fix: bump client side chart timeouts to use the SUPERSET_WEBSERVER_TIMEOUT [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #28018:
URL: https://github.com/apache/superset/pull/28018#discussion_r1564185176


##########
superset-frontend/src/components/Chart/chartAction.js:
##########
@@ -248,7 +248,7 @@ export async function getChartDataRequest({
 
 export function runAnnotationQuery({
   annotation,
-  timeout = 60,
+  timeout = 300,

Review Comment:
   Would it be sensible to use one of the existing timeout configs rather than adding a new one?



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


Re: [PR] fix: bump client side chart timeouts to 5 minutes [superset]

Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho commented on code in PR #28018:
URL: https://github.com/apache/superset/pull/28018#discussion_r1563350314


##########
superset-frontend/src/components/Chart/chartAction.js:
##########
@@ -248,17 +248,20 @@ export async function getChartDataRequest({
 
 export function runAnnotationQuery({
   annotation,
-  timeout = 60,
+  timeout,
   formData = null,
   key,
   isDashboardRequest = false,
   force = false,
 }) {
   return function (dispatch, getState) {
-    const sliceKey = key || Object.keys(getState().charts)[0];
+    const {charts, common} = getState()
+    const sliceKey = key || Object.keys(charts)[0];
+    const queryTimeout = timeout || common.conf.SUPERSET_WEBSERVER_TIMEOUT;

Review Comment:
   This config was already used elsewhere, so I decided to reuse it instead of creating a new one. Maybe in a follow up PR if we feel want the webserver and client timeouts to be different, we can update all of them. But for now, it's consistent with other parts of the js codebase. 



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