Force a file copy when cloning mediapackage elements #7374
+103
−265
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.
Some operations clone mediapackage elements and add the cloned element back to the mediapackage, e.g. when the
editoris 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:
XACMLAuthorizationService.java:285AdaptivePlaylist.java:758AwsS3DistributionServiceImpl.java:543AwsS3DistributionServiceImpl.java:847DownloadDistributionServiceImpl.java:354DownloadDistributionServiceImpl.java:482WowzaStreamingDistributionService.java:757PublishEngageWorkflowOperationHandler.java:729PublishEngageWorkflowOperationHandler.java:739DublinCoreXmlFormat.java:187SchedulerServiceImpl.java:545SchedulerServiceImpl.java:758SubtitleTimeshiftWorkflowOperationHandler.java:225DuplicateEventWorkflowOperationHandler.java:396DuplicateEventWorkflowOperationHandler.java:505How 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…