Filesets receive different visibilities at time of upload
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)
- Login as [email protected] (or as a non-Admin level user)
- Create a new work (Generic Work) and assign it to the Default Admin Set
- Add all required metadata
- Upload 2 files
- Change the work's visibility to Embargo, with a public release
- Save the work
- Refresh the work to see the Filesets are attached
- Observe that one is Private, and one is Embargo
- Click on a FileSet to view it
- 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
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
This issue does not occur on dev.samvera or pg.samvera, just sirenia
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.
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.
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:
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
FYI, this was discussed during the Samvera Tech Call on September 24, 2025