Repository navigation
fix(native-filters): Don't send unnecessary PUT request on dashboard render - #15146
Merged
Merged
Conversation
8 tasks
Codecov Report
@@ Coverage Diff @@
## master #15146 +/- ##
==========================================
- Coverage 77.49% 77.41% -0.08%
==========================================
Files 969 969
Lines 49905 49918 +13
Branches 6386 6393 +7
==========================================
- Hits 38672 38645 -27
- Misses 11030 11070 +40
Partials 203 203
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
villebro
approved these changes
Jun 14, 2021
villebro
left a comment
Member
There was a problem hiding this comment.
Thanks for the quick fix! Works like expected, but one minor non-blocking comment regarding naming.
henryyeh
pushed a commit
to preset-io/superset
that referenced
this pull request
Jun 15, 2021
…render (apache#15146) * fix(native-filters): Don't send unnecessary PUT request on dashboard render * Run native filters scopes only if feature flag is enabled * Change action name * Run native filters scopes only if at least 1 filter added * Fix lint (cherry picked from commit 3866044)
4 of 8 tasks
cccs-RyanS
pushed a commit
to CybercentreCanada/superset
that referenced
this pull request
Dec 17, 2021
…render (apache#15146) * fix(native-filters): Don't send unnecessary PUT request on dashboard render * Run native filters scopes only if feature flag is enabled * Change action name * Run native filters scopes only if at least 1 filter added * Fix lint
QAlexBall
pushed a commit
to QAlexBall/superset
that referenced
this pull request
Dec 29, 2021
…render (apache#15146) * fix(native-filters): Don't send unnecessary PUT request on dashboard render * Run native filters scopes only if feature flag is enabled * Change action name * Run native filters scopes only if at least 1 filter added * Fix lint
cccs-rc
pushed a commit
to CybercentreCanada/superset
that referenced
this pull request
Mar 6, 2024
…render (apache#15146) * fix(native-filters): Don't send unnecessary PUT request on dashboard render * Run native filters scopes only if feature flag is enabled * Change action name * Run native filters scopes only if at least 1 filter added * Fix lint
qfcwell
pushed a commit
to qfcwell/superset
that referenced
this pull request
May 12, 2026
…render (apache#15146) * fix(native-filters): Don't send unnecessary PUT request on dashboard render * Run native filters scopes only if feature flag is enabled * Change action name * Run native filters scopes only if at least 1 filter added * Fix lint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
When dashboard first renders, we calculate tabs and charts in scope of each native filter. Before, we used to send a PUT request with the results, which also modified dashboard's metadata. This PR fixes that behaviour by saving the results only in redux, without sending them to the backend. Also, now we run the calculations only if the native filters feature flag is enabled
This PR is related to an issue raised by @graceguo-supercat in comments #14933 (comment) and #14933 (comment). The problem with setting properties
show_native_filtersandnative_filter_configurationwas not caused directly by PR #14933, but the problem was elevated by that PR because of sending unnecessary PUT request. The root of the issue will be handled in a separate PR by @villebro.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Notice that in "AFTER" screenshot there's no request to

/dashboardendpoint which modifies metadata.Before:
After:

TESTING INSTRUCTIONS
DASHBOARD_NATIVE_FILTERSfeature flag to TrueSET_FILTER_SCOPESaction was dispatched and no request to/dashboardendpoint was madeDASHBOARD_NATIVE_FILTERSfeature flagSET_FILTER_SCOPESaction was NOT dispatchedADDITIONAL INFORMATION
CC: @villebro @graceguo-supercat