hyrax icon indicating copy to clipboard operation
hyrax copied to clipboard

Filesets receive different visibilities at time of upload

Open eporter23 opened this issue 1 year ago • 5 comments

Descriptive summary

In Sirenia, when uploading multiple FileSets to a single work whose visibility is set to Embargo, the FileSets receive different visibilities. This bug occurred while working through the Hyrax QA testing steps in W_1.1.

Steps to reproduce the behavior in User Interface (UI)

  1. Login as [email protected] (or as a non-Admin level user)
  2. Create a new work (Generic Work) and assign it to the Default Admin Set
  3. Add all required metadata
  4. Upload 2 files
  5. Change the work's visibility to Embargo, with a public release
  6. Save the work
  7. Refresh the work to see the Filesets are attached
  8. Observe that one is Private, and one is Embargo
  9. Click on a FileSet to view it
  10. see "unauthorized" error

Actual behavior (include screenshots if available)

Include what version of Hyrax relates to this issue (3.x, 4.x, main branch, etc.) if appropriate, and any relevant error messages/tracebacks if you're reporting a bug.

Hyrax 5.x main; Sirenia docker image

W1 1 FS Vis issue

Acceptance Criteria/Expected Behavior

  • [ ] Both FileSets should receive the same Visibility as the work
  • [ ] Non-admin depositors should be able to view the FileSets attached to their work

Related work

https://github.com/notch8/palni_palci_knapsack/issues/471

eporter23 avatar Aug 07 '24 13:08 eporter23

This issue does not occur on dev.samvera or pg.samvera, just sirenia

rjkati avatar Aug 07 '24 17:08 rjkati

This issue partially recurs as of 9/10/24 related to the Visibility issue. One FileSet is embargoed and the second is Private. However, the non-Admin user is able to view both FileSets. We aren't seeing this behavior on a non-pair treed Sirenia application locally.

eporter23 avatar Sep 10 '24 18:09 eporter23

On re-testing with cleared cache, this isn't recurring. @rjkati this may be closable if you haven't been able to reproduce it, also.

eporter23 avatar Sep 13 '24 18:09 eporter23

Recently I've observed this on pg.nurax https://pg.nurax.samvera.org/concern/monographs/f9818185-3b03-4773-92c2-6b58f728923a?locale=en

I created a work with 5 files, one of them became private while the others got the correct embargo. I tested on a Hyku instance and it was occurring still:

Image

It seems to be a timing issue where the embargoes do get created but if a background process handling the derivatives kicks off at just the right (or wrong in this case) time, then it would override the file sets’ embargo (and probably lease too) and set it to nil. Might be also related to this ticket: https://github.com/samvera/hyrax/issues/6899

This is where it's handling the embargoes and leases: https://github.com/samvera/hyrax/blob/main/lib/hyrax/transactions/steps/add_file_sets.rb#L34-L35

when the workers are turned off it seems to work all the time that's why we think it's a timing issue with how the file set is being modified in the worker vs in the web service

kirkkwang avatar Sep 19 '25 18:09 kirkkwang

FYI, this was discussed during the Samvera Tech Call on September 24, 2025

SixtyGrit avatar Sep 24 '25 22:09 SixtyGrit