dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Curation task results are not included in the output file or process output

Open bbranan opened this issue 3 years ago • 5 comments

Describe the bug

When running a curation task via the DSpace 7.0 UI, the output generated by the task process is being written to the dspace.log but not being captured in either the provided Output File or the listed Process Output. The only purpose of some curation tasks is to perform an action and provide a result. If the user cannot see the result, there is little point in allowing them to perform the task in the first place.

For example, if you run the profileformats (or "Profile Bitstream Formats") Curation Task, the Process Output will provide an output like this, which only indicates that the task ran, but doesn't provide the actual output the user needs:

2021-09-22 16:32:20.166 INFO curate - 57 @ The script has started
2021-09-22 16:32:20.555 INFO curate - 57 @ The script has completed

In contrast, the output captured in the dspace.log looks like this:

2021-09-22 16:32:20,517 INFO  unknown unknown org.dspace.curate.Curator @ Curation task: profileformats performed on: 123456789/5 with status: 0. Result: '     1 (K) Item-specific license agreed to upon submission
     1 (K) Joint Photographic Experts Group/JPEG File Interchange Format (JFIF)
'

To Reproduce

Perform any curation task that provides an output (which is most of them). In all cases you'll see the same two lines in the displayed output. Check the dspace.log to find the expected output.

Expected behavior

The results generated by the Curation Task being executed should be captured and available in the output file and process output.

bbranan avatar Sep 22 '21 20:09 bbranan

Hi @tdonohue ,

we, as 4Science, can look at this issue. Feel free to assign it to us. Thank you

corrad82-4s avatar Jul 01 '22 11:07 corrad82-4s

Thanks @corrad82-4s ! Assigning to you and moving to the "in progress" column for 7.4.

tdonohue avatar Jul 01 '22 17:07 tdonohue

this should take 4-8 hours with manual testing. Adding IT/Unit on this part of the code base could be very costly

abollini avatar Jul 22 '22 14:07 abollini

@abollini : I don't expect IT/Unit tests in this situation, as they don't already exist. So, manual testing is OK (and this might be best tested manually. I'll add an estimate of 6hrs to the ticket.

tdonohue avatar Jul 22 '22 14:07 tdonohue

A duplicate ticket to this one was just created in https://github.com/DSpace/DSpace/issues/8440. Copying in some notes from @KevinVdV on his analysis (in case these notes are useful to the 4Science team):

The fix itself should be fairly simple, in theory it just boils down to changing the log.info on the following places:

  • https://github.com/DSpace/DSpace/blob/main/dspace-api/src/main/java/org/dspace/curate/Curator.java#L549
  • https://github.com/DSpace/DSpace/blob/main/dspace-api/src/main/java/org/dspace/curate/Curator.java#L565

We should also log the system.out calls in the output, just search for that in the Curator.java class.

I estimate the work to fix to be around a day we would then:

  • Ensure that the logs end up in the output
  • tests that use the "NoOpCurationTask" & verify that the "No operation performed on " is added to the response

tdonohue avatar Aug 03 '22 14:08 tdonohue