Closed sfisher closed 7 months ago
Ingest uses a profile containing the owner for a the collection in the submission. Using this owner with the submitted local identifier ingest sends a request to inventory to get confirmation whether a previous ingest command had created an ark for an already existing object.
See also #464
Describe the bug Dryad sends two types of REST requests to Merritt-sword. We send POST requests (insert) for new datasets and PUT requests (update) for version updates. This is verified from reading our code and seeing where we make requests. We do use different types of requests against Merritt-Sword.
It would be nice if SWORD rejected PUT requests where it cannot find the previous object that it should update.
This may depend on whether PUT requests are ever used for anything besides updates in sword.
To Reproduce
Expected behavior If updates come in where the object being updated cannot be determined then they are rejected.
Note: This may not be possible if PUT requests are also used for upserts (insert and update), but I do not believe we use upserts in Dryad when communicating to Merritt-Sword, but IDK if they may be used elsewhere or if they are a part of a spec for it.
Additional context
This may not be a general solution to all the problems, but might prevent problems with submissions coming in from the SWORD interface.
If this is an easy change, it may save manual cleanup time from versions split across objects by rejecting them. Cleanup is much easier for failed submissions (just resubmit when the system is working) rather than doing manual data analysis and cleanup.