Repository navigation
fix(dashboard): show an access error for charts the viewer cannot read - #45398
Merged
madhushreeag merged 2 commits intoOct 16, 2026
Merged
Conversation
Contributor
CodeAnt PR Risk: Low Risk
Assessed commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45398 +/- ##
=======================================
Coverage 83.49% 83.49%
=======================================
Files 3047 3047
Lines 199537 199548 +11
Branches 46559 46566 +7
=======================================
+ Hits 166608 166620 +12
+ Misses 29700 29699 -1
Partials 3229 3229
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:
|
madhushreeag
deleted the
madhu/fix-dashboard-hydrate-inaccessible-chart
branch
October 16, 2026 22:56
villebro
pushed a commit
that referenced
this pull request
Oct 16, 2026
#45398) Co-authored-by: madhushree agarwal <[email protected]> (cherry picked from commit a9a7a35)
villebro
added a commit
that referenced
this pull request
Oct 16, 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 published dashboard with charts on partly inaccessible datasets goes blank with TypeError ... reading 'slice_id'. The API withholds form_data for restricted charts (#42716), and the frontend didn't handle that in two places.
hydrateDashboardreadchartItem.form_data.slice_idunconditionally, so one restricted chart took the whole dashboard down.form_datahas nodatasource, soexploreJSONthrew while building the query (DatasourceKey(undefined)), after the chart was already markedloadingand before any request was sent. Nothing ever moved it out of that state, and a later refresh would put it back.Changes
hydrate.ts: deriveslice_idfrom theidthe API still sends whenform_datais absent, and keep such a chart on the dashboard with a minimal{ slice_id, url_params }form_data (skippingapplyDefaultFormData, which needs aviz_type).HydrateChartData.form_databecomes optional to match what the API returns; the version-history code already read it aschart.form_data?.slice_id.chartAction.ts: inexploreJSON, a saved chart (it has aslice_id) with nodatasourceis failed with aCHART_SECURITY_ACCESS_ERROR("You don't have access to this chart.") instead of throwing. It sends no request. The guard is on saved charts only, so callers passing an ad-hoc form data are unaffected. Because it lives inexploreJSON, a later refresh can't bring the spinner back.This is separate from #44215, which restores
form_datafor promiscuous-viewer mode. A viewer with genuinely no access to a dataset still receives charts withoutform_data, and that case hit both problems above.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: Crash or spinning charts that are inaccessible

After:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION