Skip to content

Force a file copy when cloning mediapackage elements#7374

Open
mtneug wants to merge 3 commits intoopencast:r/19.xfrom
mtneug:force-file-copy-with-cloned-elements
Open

Force a file copy when cloning mediapackage elements#7374
mtneug wants to merge 3 commits intoopencast:r/19.xfrom
mtneug:force-file-copy-with-cloned-elements

Conversation

@mtneug
Copy link
Copy Markdown
Member

@mtneug mtneug commented Feb 8, 2026

Some operations clone mediapackage elements and add the cloned element back to the mediapackage, e.g. when the editor is skipped and only clones the source elements to the targets. This should result in a copy of the underlying file in the workspace, however, not all operations did that. This PR introduces a new helper function for cloning mediapackage elements that also creates a file copy.

Note that the following places, where mediapackage elements are cloned, remain unchanged, either because the nature of the clone is different (e.g. building the distribution mediapackage object) or the file is already copied in another way:

How to test this patch

Could be hard to confirm this without an attached debugger. Pause the execution after a clone and verify that the mediapackage object does not contain elements that share one URL.

Your pull request should…

Cloning mediapackage elements should also copy the file in the
workspace. Otherwise, operations performed on one file will affect
multiple mediapackage elements.
mtneug added a commit to tales-media/fork-opencast-opencast that referenced this pull request Feb 10, 2026
@gregorydlogan
Copy link
Copy Markdown
Member

You've got this in prod @mtneug?

@mtneug
Copy link
Copy Markdown
Member Author

mtneug commented Apr 9, 2026

You've got this in prod @mtneug?

Yes, but we don't use every WOH that got changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants