fix(embedded): restore chart rendering for guest dashboards - #43095
Conversation
Code Review Agent Run #e42548Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
The flagged issue is correct. The Would you like me to implement a fix for this issue? If you would also like me to check and address other comments on this PR, please let me know. superset-frontend/playwright/pages/EmbeddedPage.ts |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #43095 +/- ##
==========================================
- Coverage 66.63% 66.62% -0.01%
==========================================
Files 2866 2866
Lines 162740 162750 +10
Branches 37487 37490 +3
==========================================
- Hits 108445 108437 -8
- Misses 52197 52213 +16
- Partials 2098 2100 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review Agent Run #9cc143Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
9005438 to
73a6e5c
Compare
401935d to
348d10b
Compare
|
Well... still stuck/iterating here... le sigh... For posterity...
|
348d10b to
862b497
Compare
Code Review Agent Run #470e06Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Embedded dashboards stopped rendering their charts for guest (embedded) users: the dashboard payload dropped member charts and withheld their form_data, so the frontend had nothing to render and hung on the loading spinner. An embedded guest carries no standalone datasource grant, so the chart branch of raise_for_access could not recognise a guest during dashboard serialization (the dashboard/form_data context a chart-data request provides is absent there). Grant a guest access to a member chart of a dashboard their token covers, bounded by the token's dataset allowlist. Non-guest access is unchanged. Also keep the embedded Playwright helper's error-surfacing diagnostic and the cold-CI render timeout, which is what pinned this down. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
862b497 to
08238c8
Compare
|
Heya @sha174n! The embedded Playwright flake turned out to be a real rendering regression rather than test timing, so I reworked this PR to fix the actual cause. It lands in the member-chart serialization path you were recently in, so I'd love your eyes on it. Does the guest handling look right to you? |
Code Review Agent Run #c4a258Actionable Suggestions - 0Additional Suggestions - 2
Filtered by Review RulesBito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
sha174n
left a comment
There was a problem hiding this comment.
Reviewed the guest-dashboard rendering change — the grant is on the chart-definition path only and stays bounded to the token's dashboards + dataset allowlist; the data-query path is unchanged. LGTM.
SUMMARY
Embedded dashboards recently stopped rendering their charts for guest (embedded) users. The dashboard payload was leaving out the member charts and their
form_data, so the embedded frontend had nothing to render and sat on the loading spinner. It surfaced as an intermittent failure of the embedded Playwright suite.An embedded guest reaches a dashboard and its charts through its guest token rather than a standalone datasource grant, so the chart branch of
raise_for_accessdidn't recognize a guest while serializing a dashboard's member charts (the dashboard andform_datacontext that a chart-data request supplies isn't present during serialization). This grants a guest access to a member chart of a dashboard their token covers, bounded by the token's dataset allowlist. Non-guest access is unchanged.The embedded Playwright helper keeps the small diagnostic that surfaces the embed error message instead of blindly timing out (which is what pinned this down), along with the cold-CI render timeout.
TESTING INSTRUCTIONS
tests/unit_tests/security/test_embedded_guest_chart_access.pycovers the guest chart-access branch (granted vs. non-granted dashboard, the feature-flag gate, the non-guest path) and the dataset-allowlist bound. The existing guest-token allowlist tests still pass unchanged. The embedded Playwright suite exercises the end-to-end render.To verify manually: embed a dashboard with a guest token and confirm its charts render.
ADDITIONAL INFORMATION