Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version of file cannot be downloaded #6211

Closed
rjkati opened this issue Aug 24, 2023 · 6 comments
Closed

New version of file cannot be downloaded #6211

rjkati opened this issue Aug 24, 2023 · 6 comments

Comments

@rjkati
Copy link

rjkati commented Aug 24, 2023

Descriptive summary

When I upload a new version of a file on pg.nurax, the upload process completes in the UI, but the new version of the file cannot be downloaded.

Steps to reproduce the behavior in User Interface (UI)

  1. Deposit a new work on pg.nurax or navigate to a work which you've previously deposited
  2. On the work show page for your deposited work, scroll down to the Items list and click on the file name
  3. Click the Edit This File Set button
  4. Click the Versions tab
  5. Click the green Choose New Version File button
  6. Select a new file and click Open
  7. Click the Upload New Version button.
  8. Observe that the user activity log on the file set page has been updated to reflect your action.
  9. Click the Download link and observe that the original file is downloaded, rather than the revised version.

Actual behavior (include screenshots if available)

User activity section on the fileset page reflects that a new version has been uploaded, but download button downloads the original version.

Acceptance Criteria/Expected Behavior

After uploading the new version of a file, the user activity section on the fileset page should reflect that a new version has been uploaded and the download button should download the new version.

@tpendragon
Copy link
Contributor

@marrus-sh is going to add a link to a PR that added some versioning things to the valkyrie branch of this code to help guide implementation.

@tpendragon
Copy link
Contributor

tpendragon commented Aug 25, 2023

There might be missing API in Valkyrie for this - we just need to know what that API should be and we can get it added. See samvera/valkyrie#162

@tpendragon
Copy link
Contributor

tpendragon commented Aug 25, 2023

We'll have to repeat QA of versioning features right after implementing this. Put this in the QA column.

@marrus-sh
Copy link
Collaborator

marrus-sh commented Aug 25, 2023

Here is the PR where I previously worked on versioning in a Valkyrie context: #5886

Ultimately versioning support is provided by the storage adapter, which needs supports?(:versions) and an implementation of a find_versions method. The fallback in Valkyrie if no versions are available is resource.file_identifier.

It’s surprising to me that №8 in the steps to reproduce works successfully in PG nurax. Does the nurax PG adapter actually support versioning, or is this effectively a no‐op despite being logged? I think getting some tests to ensure that uploading a new version actually does something on the postgres backend would be a good place to start.

The final checkbox in #5876 might be a place to begin looking as well.

@tpendragon
Copy link
Contributor

tpendragon commented Aug 28, 2023

It's our feeling that a variety of the versioning stuff in Hyrax w/ Valkyrie just silently fails.

There's stuff for reading versioning and stuff for saving versioning - a lot of that is currently missing regardless of which storage adapter you're using. Don't know if Wings has saving versions - it has support for reading versions.

Right now it's expected that the storage adapter has a #supports method for versioning and there are some extra queries the storage adapter should support as well.

We think we can look at lib/wings/storage.rb. Some memories are supports?(:version) and find_version.

Step 1: Investigate what the current implementation is and document it here.
Step 2: See if versioning works w/ Wings. That'd be Dassie w/ use_valkrie: true.
Step 3: Get a versioned adapter set up for nurax-pg.

@tpendragon
Copy link
Contributor

We've disabled versioning in nurax-pg, we're going to close this ticket and run QA after closing #6234 and if versioning is still broken then we'll open a new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants