sul-dlss / dor-services-app

A Rails application exposing Digital Object Registry functions as a RESTful HTTP API
https://sul-dlss.github.io/dor-services-app/
Other
3 stars 2 forks source link

New publish/shelve API does not shelve files from preservation #5082

Closed andrewjbtw closed 3 months ago

andrewjbtw commented 3 months ago

Describe the bug In 2021, we implemented a feature for shelving files from preservation (see #2766). This makes it possible to shelve files that have already been preserved without having to reaccession them through Preassembly or another app.

This feature is not working with the publish/shelve API. I'm seeing "No such file or directory" errors when trying this: Errno::ENOENT: No such file or directory @ rb_sysopen - /dor/workspace/rm/454/ct/9775/rm454ct9775/content/file1.txt https://argo-stage.stanford.edu/view/druid:rm454ct9775

User Impact This is a regression. Being able to shelve from preservation makes some remediation tasks much easier than before. It can be the difference between doing them or not doing them at all.

To Reproduce Steps to reproduce the behavior:

  1. Go to an item that has preserved files that are not shelved.
  2. Open a new version.
  3. Make sure the item's rights allow public access (they are not dark).
  4. Use the structural metadata CSV to change the publish and shelve settings from "no" to "yes" for at least one file.
  5. Close the object.
  6. See shelve error in the DSA retries

Expected behavior If a file is in preservation and currently unshelved, changing it to shelve=yes should shelve it.

andrewjbtw commented 3 months ago

I killed the retries on the two items that I used for testing this

https://argo-stage.stanford.edu/view/druid:nn888ts0214 https://argo-stage.stanford.edu/view/druid:rm454ct9775