The Scheduler REST endpoint still accepts edits to event ID After Ingest

Steps to reproduce

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.

Activity

Show:
Former user
June 22, 2013, 8:22 PM

src/main/java/org/opencastproject/scheduler/endpoint/SchedulerRestService.java
src/main/java/org/opencastproject/scheduler/impl/SchedulerServiceImpl.java
src/test/java/org/opencastproject/scheduler/impl/SchedulerServiceImplTest.java
Committed revision 14951.

Greg Logan
July 25, 2013, 8:49 PM

Merged into trunk with rev 15141, merged into 1.4.x with rev 15143.

Former user
April 10, 2015, 7:34 PM
Edited

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.

Former user
April 14, 2015, 2:37 PM
Edited

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().

Lars Kiesow
September 7, 2015, 1:17 PM

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.

Assignee

Former user

Reporter

Former user

Severity

Usability Issue

Tags (folksonomy)

Components

Fix versions

Affects versions

Priority

Major
Configure