usnistgov / oar-pdr

The NIST Open Access to Research (OAR) Public Data Repository (PDR) system software
11 stars 10 forks source link

ODD-954: Require POD as input to preservation service #168

Closed RayPlante closed 3 years ago

RayPlante commented 3 years ago

This PR addresses ODD-954 ("pubserver: require POD record as input to preservation request") which calls for a change to the preservation service API intended to prevent a common failure mode. The fix now requires that the latest POD record to be provide as input to the preservation request to ensure that archived POD data is in sync with MIDAS, and most importantly, to ensure that the latest date held by MIDAS is actually valid. The preservation service now processes the POD record just as if it was sent to the /latest/ pubserver endpoint, and then proceeds with preservation; if the POD record is invalid, preservation is not carried out, and the client returned an error status.

Test this PR via the oar-docker PR#134.

RayPlante commented 3 years ago

Approved by @chuanlin2018 via oar-docker PR#134.