Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SQL Lab] fix unnecessary offline action #7594

Merged

Conversation

graceguo-supercat
Copy link

@graceguo-supercat graceguo-supercat commented May 25, 2019

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

QueryAutoRefresh polls running query's status every 2 seconds. if query is running good, it calls setUserOffline (for every 2 seconds). Because Sql Lab uses redux-localStorage to sync redux state to localStorage, any time an action is dispatched in redux it will trigger localStorage update (even without any change), which is very unnecessary when there is no real state change.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before: i used redux chrome extension to show redux state update:
yiiT5KqH1O

TEST PLAN

CI and manual check.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

@michellethomas @mistercrunch @williaster

@codecov-io
Copy link

Codecov Report

Merging #7594 into master will increase coverage by 0.1%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #7594     +/-   ##
=========================================
+ Coverage   65.21%   65.32%   +0.1%     
=========================================
  Files         435      435             
  Lines       21480    21486      +6     
  Branches     2381     2382      +1     
=========================================
+ Hits        14008    14035     +27     
+ Misses       7352     7331     -21     
  Partials      120      120
Impacted Files Coverage Δ
.../assets/src/SqlLab/components/QueryAutoRefresh.jsx 66.66% <60%> (+53.84%) ⬆️
superset/assets/src/SqlLab/actions/sqlLab.js 64.19% <0%> (+0.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47ba2ad...59aac44. Read the comment docs.

Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@graceguo-supercat graceguo-supercat merged commit dbdb6b0 into apache:master May 30, 2019
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 31, 2019
michellethomas pushed a commit that referenced this pull request Jun 1, 2019
@graceguo-supercat graceguo-supercat deleted the gg-FixSetOfflineAction branch August 8, 2019 20:38
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 28, 2024
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants