You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2019/06/08 01:00:02 UTC

[incubator-superset] 03/08: [SQL Lab] Prevent failed query error from disappearing (#7624)

This is an automated email from the ASF dual-hosted git repository.

michellet pushed a commit to branch release--0.33
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit 642d6c1364aab16dfd6bfb85b4691156b26c7184
Author: Erik Ritter <er...@airbnb.com>
AuthorDate: Fri May 31 15:27:08 2019 -0700

    [SQL Lab] Prevent failed query error from disappearing (#7624)
    
    
    (cherry picked from commit 5895d8c8e1f99903d0422c67189f4526cedf80c4)
---
 superset/assets/src/SqlLab/reducers/sqlLab.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/superset/assets/src/SqlLab/reducers/sqlLab.js b/superset/assets/src/SqlLab/reducers/sqlLab.js
index 93ff325..6b263bd 100644
--- a/superset/assets/src/SqlLab/reducers/sqlLab.js
+++ b/superset/assets/src/SqlLab/reducers/sqlLab.js
@@ -257,7 +257,10 @@ export default function sqlLabReducer(state = {}, action) {
       let queriesLastUpdate = state.queriesLastUpdate;
       for (const id in action.alteredQueries) {
         const changedQuery = action.alteredQueries[id];
-        if (!state.queries.hasOwnProperty(id) || state.queries[id].state !== 'stopped') {
+        if (
+          !state.queries.hasOwnProperty(id)
+          || (state.queries[id].state !== 'stopped' && state.queries[id].state !== 'failed')
+        ) {
           if (changedQuery.changedOn > queriesLastUpdate) {
             queriesLastUpdate = changedQuery.changedOn;
           }