mikebridge commented on code in PR #45530:
URL: https://github.com/apache/superset/pull/45530#discussion_r4380739732


##########
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:
   Took it, adjusted for the opt-in: the comment now says the version fork 
sends complete metadata with `replace_metadata`, and other callers keep seeding 
from the source.



##########
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:
   Thanks, good call on the contract. Rather than change it for every copy 
caller, we made the replace-from-supplied-metadata behavior opt-in: 
`replace_metadata` on the copy request, which only the version fork sends. Save 
as, the MCP duplicate tool and other API clients keep seeding from the source 
as before. Chart-specific keys are still pruned and remapped to the copied 
layout in both modes. So this is no longer a breaking change, and I removed the 
UPDATING 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