SciCatProject / scicat-backend-next

SciCat Data Catalogue Backend
https://scicatproject.github.io/documentation/
BSD 3-Clause "New" or "Revised" License
20 stars 21 forks source link

jobs api: jobResultObject missing in jobs-release #1388

Closed phwissmann closed 1 week ago

phwissmann commented 3 weeks ago

jobResultObject missing in jobs-release

Summary

jobResultObject (or an alternative) is missing in the jobs-release branch. In main this was for example used to report urls for downloading retrieved datablocks:

  "jobResultObject": {
    "result": [
      {
        "datasetId": "20.500.11935/2f919991-2197-41bc-9edd-cbbecc2339ce",
        "name": "2f919991-2197-41bc-9edd-cbbecc2339ce_0_2024-07-12-23-47-53.tar",
        "size": 572897,
        "archiveId": "/STANDARD1S/oneCopySmall/p18724/raw/2024/07/12/20.500.11935/2f919991-2197-41bc-9edd-cbbecc2339ce_0_2024-07-12-23-47-53.tar",
        "url": "https://object.cscs.ch/v1/AUTH_ba83c1e328974db299bef2291c21a770/noderedp/828b948e4443242a514791ff8764cea2/2f919991-2197-41bc-9edd-cbbecc2339ce_0_2024-07-12-23-47-53.tar?temp_url_sig=5792fc444b4531ee50d7b4ed5065b0f8395b7486&temp_url_expires=1724658421"
      }
    ]
  },

The code change seemed to have happened when changing update-job.dto to status-update-job.dto, see https://github.com/SciCatProject/scicat-backend-next/blob/release-jobs/src/jobs/dto/status-update-job.dto.ts vs https://github.com/SciCatProject/scicat-backend-next/blob/master/src/jobs/dto/update-job.dto.ts

sbliven commented 2 weeks ago

Does this need to update the job in the database, or does the result just get passed through to the actions triggered by the status update?

sbliven commented 2 weeks ago

After discussion, we believe that this should be included in the job.schema (thus persisted in the database) and the jobStatusUpdate.dto (allowing it to be set by the archive system)

despadam commented 1 week ago

Solved by https://github.com/SciCatProject/scicat-backend-next/pull/1410