samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
182 stars 122 forks source link

Enabling pairtree paths for Fedora 6 in Sirenia #6804

Open randalldfloyd opened 1 month ago

randalldfloyd commented 1 month ago

NOTE: this PR depends on changes in this Valkyrie PR.

Fedora 6.5 now supports automatic creation of "pairtree" IDs, which means that identifiers are stored in a hashed directory structure to avoid excessive child nodes directly in the root node.

However, unlike Fedora 4 where this was the default behavior, it has to be enabled via options in 6.5. Since doing so requires configuring both the count and length of the pairtree algorithm, it needs to be configurable in the Valkyrie Fedora adapters so that both sides match.

This PR sets the fcrepo image to run 6.5 in the Sirenia compose file and sets JVM runtime options to enable automatic creation of pairtree paths. The corresponding values are then set in the Valkyrie adapter initialization so that ID to URI translations are correct.

For example, if an ID of AaBbCcDd in Fedora was created under the root node as /Aa/Bb/Cc/Dd/AaBbCcDd, then setting count and length to 4 and 2 in the Fedora adapters ensures that the same path will be calculated and returned.

Note that the configuration above is not required for pairtree paths to work correctly in Fedora 4, and automatic pairtree creation is not supported under Fedora 5 or Fedora 6 < 6.5.

github-actions[bot] commented 1 month ago

Test Results

    17 files  ±0      17 suites  ±0   2h 18m 43s :stopwatch: + 1m 13s  6 705 tests ±0   6 407 :white_check_mark:  - 1  297 :zzz: ±0  1 :x: +1  13 178 runs  ±0  12 782 :white_check_mark:  - 1  395 :zzz: ±0  1 :x: +1 

For more details on these failures, see this check.

Results for commit 478f3c43. ± Comparison against base commit 26fdf09c.

This pull request removes 267 and adds 267 tests. Note that renamed tests count towards both. ``` spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 0c2f831b-2b4a-45c0-83b1-443aca60f7ff spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: ea9e9b47-c5fd-43b2-bde8-9f6d0c13299a spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 72613a81-c215-4b97-9612-11afc9184c61 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: b4820bcf-eb7f-4d02-bda4-2c4af7eb1cad spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: 07fa27e5-333e-425f-8684-a2c08c5530fa spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: fb906f22-79e2-4c3f-a61e-28059c092448 … ``` ``` spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: e66d2e91-a624-4d5b-9765-53f7c3d1b837 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: ec0a6d20-d263-4cae-9e2b-20aef7ba62f3 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 1b3ae06d-fed9-466f-867f-0292d78e5f69 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: aa39d452-3083-4d32-b3f3-fa0cf6e1a829 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: 7951338b-724a-43eb-9bbd-00f9844c0a4b spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 18ed8564-d8db-4795-b244-099bdfb19a19 … ```

:recycle: This comment has been updated with latest results.