Closed abelemlih closed 1 week ago
17 files ±0 17 suites ±0 2h 19m 59s :stopwatch: + 1m 47s 6 703 tests - 1 6 406 :white_check_mark: +4 297 :zzz: ±0 0 :x: - 5 13 175 runs ±0 12 780 :white_check_mark: +5 395 :zzz: ±0 0 :x: - 5
Results for commit 591dd33e. ± Comparison against base commit d4e646c7.
:recycle: This comment has been updated with latest results.
@randalldfloyd thanks for looking into this, I really appreciate it. I fixed the specs, and the PR is ready for another review. Thanks!
@abelemlih @dlpierce
Just another FYI... I have ran this locally as part of other work I'm doing, and the sirenia app runs using fcrepo:6.5-tomcat9
without breaking on startup in the admin set service. I can merge soon if no other reviewers want to ring in on it.
@dlpierce I rebased this PR and it is now ready to review. Let me know if you have any feedback, thanks!
Fixes
Fixes Fedora 6.5+ compatibility, since it does not support encoded slashes in IDs.
Summary
We currently cannot use Fedora 6.5+ with Hyrax because it does not support encoded slashes in IDs. This leads to failure every time we perform
Hyrax.query_service.find_by(id: DEFAULT_ID)
. In this PR, I change theDEFAULT_ID
to use underscores only, and add backwards compatibility changes to helper methods finding existing admin sets.Type of change (for release notes)
notes-bugfix
Bug FixesDetailed Description
After delving into the use of
DEFAULT_ID
, it’s only ever used as an actual ID in places that have a hardcoded admin set with that ID, which is not the case for Postgres or Fedora (Fedora uses UUID). The reasoning behind my PR is, to support backwards compatibility, when we need to lookup any existing unused admin set with default id, lookup for bothadmin_set/default
andadmin_set_default
, if none exist then go forward with creating a new admin set, which will use UUID with Valkyrie. This change ensures new apps using underscores if they ever have to create a default admin set withDEFAULT_ID
, and supports any existing apps that do not use Postgres/Fedora via Valkyrie and have an admin set with the id explicitly set toadmin_set/default
.one edge case to this approach is, if there is a repository that has a default admin set in Fedora that has an id explicitly set to
admin_set/default
, then it will still break, because Fedora 6.5+ will break every time it looks it up. My understanding is we store the default admin set id in Fedora with UUID, and we store the UUID in thehyrax_default_administrative_set
on the database.Changes proposed in this pull request:
DEFAULT_ID
for administrative sets to use underscores onlyfind_unsaved_default_admin_set
to lookup bothadmin_set/default
andadmin_set_default
when looking for any existing unused default admin sets.@samvera/hyrax-code-reviewers