-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
feat(config): Add none force-refresh option for auto refresh #17039
Conversation
Thanks @villebro, I just added PR :) I think it is better to add as a config option so users can choose - what do you think? |
Codecov Report
@@ Coverage Diff @@
## master #17039 +/- ##
==========================================
- Coverage 76.92% 76.66% -0.27%
==========================================
Files 1031 1031
Lines 55157 55200 +43
Branches 7501 7507 +6
==========================================
- Hits 42430 42318 -112
- Misses 12475 12630 +155
Partials 252 252
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Hello @yongchand thanks for the contribution! I am thinking that feature flags might not be the best place for this type of setting. @villebro correct me if I am wrong, but being a frontend-only constant, probably |
@geido Thanks for your opinion! |
I agree with @geido that this should be a general config, not a feature flag. I would propose adding something similar to this to DASHBOARD_AUTO_REFRESH_MODE: Literal["fetch", "force"] = "force" Then that needs to be added to bootstrap data by adding the key to |
Thanks @yongchand! I started CI and will test today |
Done with lint issues! All fixed! (I hope) :) |
Thanks @yongchand; CI started 👍 |
@villebro sorry for keep pinging you! Just fixed isort issue. If this goes fine, please merge whenever you are available :) |
No worries @yongchand, CI restarted 🙂 |
Everything seems fine except for cypress-matrix (which seemed to be fine on last run). Do you possibly know the reason? @villebro |
@yongchand seems to be a flaky test - I just restarted it, will try to monitor it today to make sure it passes |
Seems good now! Thanks :) @villebro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for all the iterations @yongchand !
…17039) * feat(config): Add none force-refresh option for auto refresh * use general config * fix lint issues * last lint fix
SUMMARY
Add alternative option for issue #16944
If people think this should be default, I may just remove from config and simply change force -> fetch
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
https://user-images.githubusercontent.com/43336767/136601879-c3ea7040-5944-43b6-bf05-15d7f29ef22a.mov
When DASHBOARD_FORCE_AUTO_REFRESH is True, chart will query every time when it auto-refreshes.
After:
https://user-images.githubusercontent.com/43336767/136601893-a876f406-6190-4d90-bffb-e78e4eaa8661.mov
When DASHBOARD_FORCE_AUTO_REFRESH is False, chart will use cache if it exist during auto-refresh.
TESTING INSTRUCTIONS
Since this PR requires to change superset-ui to change, you can test by following step instead.
ADDITIONAL INFORMATION