Repository navigation
[Sqllab] Add offline state to sqllab - #6013
timifasubaa merged 3 commits into
Conversation
120826e to
ee89873
Compare
Codecov Report
@@ Coverage Diff @@
## master #6013 +/- ##
=======================================
Coverage 76.91% 76.91%
=======================================
Files 47 47
Lines 9362 9362
=======================================
Hits 7201 7201
Misses 2161 2161Continue to review full report at Codecov.
|
There was a problem hiding this comment.
this line will make all long query (>3 seconds) abort.
There was a problem hiding this comment.
Okay, I will remove the timeout option.
There was a problem hiding this comment.
i will prefer show error message not force refresh user's browser.
ee89873 to
b3ef68f
Compare
da86a1f to
f079f04
Compare
70774eb to
34b1453
Compare
|
Ready for review |
There was a problem hiding this comment.
you don't need self variable. see the exist code.
There was a problem hiding this comment.
also corrected.
There was a problem hiding this comment.
this logic (set initial value for offline state) should be in function getInitialState
There was a problem hiding this comment.
Oops. Corrected.
There was a problem hiding this comment.
is adding redux connect for this component necessary? where do you need to check state?
There was a problem hiding this comment.
it's necessary because I ensure it is online before the ajax calls
ced2f09 to
78f66fe
Compare
|
All concerns addressed. |
There was a problem hiding this comment.
Rename this to SET_USER_OFFLINE to make verb like other action names.
There was a problem hiding this comment.
userOffline => setUserOffline
78f66fe to
b459143
Compare
There was a problem hiding this comment.
if it is in offline state, you don't need to run these logic, you just render offline and exit early, right? so you can move offline check before this line.
There was a problem hiding this comment.
instead of create a hard-coded text here, you should create new entry in STATUS_OPTIONS in constants.js
b459143 to
734bcdb
Compare
b6fd18e to
46009c3
Compare
|
Ready for review |
46009c3 to
7221cc5
Compare
There was a problem hiding this comment.
before .setProps, can you add an expect that disabled props toBe(false)?
2c1be7e to
81c4be4
Compare
|
Ready for stamp! |
81c4be4 to
3879751
Compare
3879751 to
573ebac
Compare
* add timeout and refresh for failed backend * show offline state instead of refreshing * add southpane tests
|
FYI #6782 |
|
@timifasubaa I'm not sure why, but in some cases when queries that return errors are executed, I see |
* add timeout and refresh for failed backend * show offline state instead of refreshing * add southpane tests
This is a user experience improvement in sqllab. Historically, if the user was disconnected from the internet or the backed was down, sqllab continues to poll from the backend. All the while showing the user they are in the pending state. This is confusing to the user as they would keep thinking their query is pending for a long time when the request hasn't been sent to the backend.
This PR makes it show
offlinewhen the ajax request cannot connect to the backend to avoid confusion .@graceguo-supercat @kristw
