EnxDev commented on code in PR #45530:
URL: https://github.com/apache/superset/pull/45530#discussion_r4363038768
##########
UPDATING.md:
##########
@@ -24,6 +24,16 @@ assists people when migrating to a new version.
## Next
+- **Dashboard copies use the supplied metadata as their complete settings.**
Review Comment:
This changes the contract for any client that sends partial `json_metadata`
to `POST /copy/`, not only the version fork.
Worth a `!` in the title (`fix(dashboard)!: ...`) so it gets picked up as a
breaking change? Your call, the entry here already covers the substance.
##########
superset/daos/dashboard.py:
##########
@@ -1014,8 +1108,18 @@ def copy_dashboard(
# flush delete dashboard_slices rows that were never inserted.
dash.slices = original_dash.slices
- dash.params = original_dash.params
+ # Copy callers supply the selected version's complete metadata. Seeding
+ # from the live dashboard would leak settings absent from that version.
Review Comment:
Nit, take it or leave it. Save as and the MCP duplicate tool also land here,
so pinning this on "the selected version" undersells the contract every caller
now relies on.
```suggestion
# Every copy caller (Save as, version fork, MCP duplicate) sends the
# complete metadata. Seeding from the source would leak omitted
settings.
```
--
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]