fix(explore): retain chart ownership on query context update#16419
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16419 +/- ##
==========================================
- Coverage 76.55% 76.55% -0.01%
==========================================
Files 1000 1000
Lines 53487 53486 -1
Branches 6818 6818
==========================================
- Hits 40948 40947 -1
Misses 12301 12301
Partials 238 238
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Member
|
Fixies issues that will reappear after merging #16408 |
zhaoyongjie
approved these changes
Aug 24, 2021
Member
zhaoyongjie
left a comment
There was a problem hiding this comment.
LGTM, BTW, the detailed test case saves lots of review time.
amitmiran137
pushed a commit
to nielsen-oss/superset
that referenced
this pull request
Aug 26, 2021
* upstream/master: (25 commits) chore(ci): bump pylint to 2.10.2 (apache#16463) fix: prevent page crash when chart can't render (apache#16464) chore: fixed slack invite link (apache#16466) fix(native-filters): handle null values in value filter (apache#16460) feat: add function list to auto-complete to Clickhouse datasource (apache#16234) refactor(explore): improve typing for Dnd controls (apache#16362) fix(explore): update overwrite button on perm change (apache#16437) feat: Draggable and Resizable Modal (apache#16394) refactor: sql_json view endpoint (apache#16441) fix(dashboard): undo and redo buttons weird alignment (apache#16417) fix: setupPlugin in chart list page (apache#16413) fix: Disable Slack notification method if no api token (apache#16367) feat: add Shillelagh DB engine spec (apache#16416) fix: copy to Clipboard order (apache#16299) docs: make FEATURE_FLAGS.md reference a link (apache#16415) chore(viz): bump superset-ui to 0.17.87 (apache#16420) feat: add activate command (apache#16404) Revert "fix(explore): let admin overwrite slice (apache#16290)" (apache#16408) fix(explore): retain chart ownership on query context update (apache#16419) chore: Removes the TODOs and uses the default page size (apache#16422) ...
Contributor
|
🏷 2021.31 |
opus-42
pushed a commit
to opus-42/incubator-superset
that referenced
this pull request
Nov 14, 2021
QAlexBall
pushed a commit
to QAlexBall/superset
that referenced
this pull request
Dec 28, 2021
qfcwell
pushed a commit
to qfcwell/superset
that referenced
this pull request
May 12, 2026
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
A feature was recently introduced to automatically populate
query_contextin the chart metadata if it was missing. This was necessary to be able to render V1 chart reports, which require the frontend-rendered query request (not possible by the backend). However, if a non-owner triggered the chart update command, the original ownership data was lost due to the update payload not containing theownersproperty. This was due to theself.populate_ownersmethod setting the owners to whichever value was passed in the request, which in this case was alwaysNone.This PR changes the chart update command to not modify the
ownersproperty when calling the chart update command withquery_context_generation. In addition, an integration test is added to ensure that a non-owner can update the query context payload without changing theownersproperty (test fails on master).TESTING INSTRUCTIONS
ADDITIONAL INFORMATION