mikebridge opened a new pull request, #45800:
URL: https://github.com/apache/superset/pull/45800

   ### SUMMARY
   Saving a dashboard layout that contains a tile for a chart you can't read no 
longer fails. The chart isn't attached to the dashboard, and its tile is saved 
as the same "This chart no longer exists." placeholder a deleted chart gets. 
This typically happens with a stale tile left after a chart was detached. 
Because the result is identical, a save doesn't reveal whether a chart you 
can't read exists.
   
   This is stacked on #45538 and changes its behaviour for that one case. 
#45538 returns 422 for such a chart; this PR leaves it unlinked as a 
placeholder instead.
   - **Unchanged:** charts already on the dashboard (archived ones included) 
and a copy's source charts aren't checked, and readable charts are linked as in 
#45538.
   - **Copy with charts:** a readable chart outside the source still refuses 
the copy with 422.
   - **Routes covered:** dashboard `PUT` (both `json_metadata.positions` and 
raw `position_json`), `POST`, and the copy endpoint, which the MCP 
`duplicate_dashboard` tool also uses.
   
   > **Stacked on #45538.** Until that merges, this PR also shows #45538's 
commits; the change here is the last two commits. Master will be merged in once 
#45538 lands.
   
   ### TESTING INSTRUCTIONS
   - `pytest tests/unit_tests/dao/dashboard_test.py 
tests/unit_tests/mcp_service/dashboard/tool/test_duplicate_dashboard.py`
   - `pytest tests/integration_tests/dashboards/api_tests.py -k 
"layout_chart_access or matches_missing_chart or layout_detached_chart"`
   
   ### ADDITIONAL INFORMATION
   - [x] Changes UI (a stale tile renders as the existing missing-chart 
placeholder)
   - [x] Has associated UPDATING.md entry (updates #45538's entry)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to