Steps to reproduce:
1. Schedule a recording and wait for ingest to start
2. Use Schedule REST endpoint to retrieve and update dublincore
3. The dublincore is happily updated, but it's an orphaned copy.
Actual Results: The updates are going to an orphaned catalog
Expected Results: The catalog in the mediapackage associated to the event id is updated, or the endpoint returns no event id.
Workaround (if any): Don't use the Scheduler REST endpoint near point of ingest.
Committed revision 14951.
Merged into trunk with rev 15141, merged into 1.4.x with rev 15143.
Re-opening this issue. The Scheduler service is able to return the orphaned episode dublin core, so it should be able to continue to update it, for as long as it is able to serve it. Once it stops being able to serve the episode, it should stop being able to update it. The previous pull on this ticket prevents the Scheduler service from updating information that it continues to serve.
The Original motivation for this ticket is to alert the caller that updating the event metadata does not have the desired effect after the schedule end time, because the schedule's copy of the dublin core, in the schedule table in the db, is not the same dublin core data used by the workflow during processing. The "alert" is in the form of throwing the SchedulerException after the end time has passed in the update method.
The motivation for Re-Opening this ticket is that Scheduler service continues to serve the old dublin core from it's endpoint well after ingest. The scheduler dublin core is orphaned and un-updatable, but still served. The new motivation is to be able to update the data that is still served from the scheduler endpoint.
It is not practical to just revert the verify check on the event end time.
TMI: The SchedulerServiceImpl.updateEvent() method checks if ([event] getCurrentDate().after(endDate)) then throw a SchedulerException.
Throwing that exception stops line 828 "updateWorkflow(event, startDate, endDate, wfProperties);" from executing. If the event end date is not checked, then the updateWorkflow() executes. The updateWorkflow() contains mis-logic at lines 436-441 which allows schedule service to update the mp after ingest. The line 446 "mediapackage.setDuration(endDate.getTime() - startDate.getTime());" will cause an IllegalStateException run-time exception, that is not caught by Scheduler Service. Side note: When workflow service updates a mp, it directly avoids calling mediapackage.setDuration().
I resolve this since it is only assigned to 1.5. If this is still relevant for never versions, please reopen and update the fix version.