You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "justinpark (via GitHub)" <gi...@apache.org> on 2024/06/06 16:35:20 UTC
[PR] refactor(sqllab): nonblocking switch query editor [superset]
justinpark opened a new pull request, #29108:
URL: https://github.com/apache/superset/pull/29108
### SUMMARY
Following up #24539
This commit modifies the `setActiveQueryEditor` function to asynchronously handle the process of switching active a queryEditor in localStorage in the same way as in non-persistent mode and periodically post active state to persistence via AutoSync's `updateCurrentSqlEditor`.
This commit made the following changes:
- Modified the process to remove the step of switching the activeQueryEditor based on the persistent mode in `switchQueryEditor`, and instead changed it to fetchQueryEditor to clearly fetch the persistent queryEditor record from the api
- In persistence mode, changing the active tab will no longer block the query editor data until it is fetched. Instead, the tab will change and a loading state will be displayed [see the following screenshots]
- `setActiveQueryEditor` has been modified to always apply to localStorage in the same way as in non-persistence mode
- EditorAutoSync will execute `updateCurrentSqlEditor` periodically and then set `lastUpdatedActiveTab` on success
- Add the logic of storing localStorage tabHistory for persistence mode
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
**In a state of network delay**
Before:
https://github.com/apache/superset/assets/1392866/c9af31fd-d830-4b0a-98e3-28ba0a664d40
After:
https://github.com/apache/superset/assets/1392866/95b21cc6-5b02-4bf5-85bf-b0684aa11c3b
### TESTING INSTRUCTIONS
set SQLLAB_BACKEND_PERSISTENCE on
go to sqllab and then switch each tab quickly
### 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] refactor(sqllab): nonblocking switch query editor [superset]
Posted by "justinpark (via GitHub)" <gi...@apache.org>.
justinpark merged PR #29108:
URL: https://github.com/apache/superset/pull/29108
--
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] refactor(sqllab): nonblocking switch query editor [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #29108:
URL: https://github.com/apache/superset/pull/29108#issuecomment-2163981902
Ephemeral environment shutdown and build artifacts deleted.
--
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] refactor(sqllab): nonblocking switch query editor [superset]
Posted by "justinpark (via GitHub)" <gi...@apache.org>.
justinpark commented on PR #29108:
URL: https://github.com/apache/superset/pull/29108#issuecomment-2153049339
/testenv up FEATURE_SQLLAB_BACKEND_PERSISTENCE=true
--
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] refactor(sqllab): nonblocking switch query editor [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #29108:
URL: https://github.com/apache/superset/pull/29108#issuecomment-2153066614
@justinpark Ephemeral environment spinning up at http://34.222.239.100:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.
--
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