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

Prevent AF loading members or files unless members or files are being loaded in the outer Valkyrie object #6774

Closed orangewolf closed 2 months ago

orangewolf commented 2 months ago

This speeds up AdministrativeSet and Collection actions that do not require touching the members.

Fixes

Fixes #6772

Summary

We currently load the AF members of collections and admin sets when ever we run the AFConverter on them. This causes very long load times for data we then discard.

@samvera/hyrax-code-reviewers

github-actions[bot] commented 2 months ago

Test Results

    9 files  ±0      9 suites  ±0   17m 20s :stopwatch: +42s 4 762 tests ±0  4 699 :white_check_mark: ±0  63 :zzz: ±0  0 :x: ±0  6 488 runs  ±0  6 425 :white_check_mark: ±0  63 :zzz: ±0  0 :x: ±0 

Results for commit b2a1a6f4. ± Comparison against base commit d8f0e9c0.

This pull request removes 100 and adds 100 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 destroy Hyrax::AdministrativeSet: 2f9da4c2-e182-4d1b-a595-184d0b91cb45 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: eb5fe03e-ecab-43c7-85d0-79fa6d41bab1 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: f9f2378b-b532-4d8f-879a-408e5e60c0dd spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to destroy Hyrax::AdministrativeSet: d1c33524-be48-4748-b2ef-dee81075e403 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to edit Hyrax::AdministrativeSet: a100d498-c1b8-4e66-9cec-f1f1a7d79af6 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to update Hyrax::AdministrativeSet: a0220071-956a-4438-a83e-7b6dd373f24b … ``` ``` 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 Hyrax::AdministrativeSet: 52ee12ff-7ca1-4525-876d-d9176756f200 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: 80b77927-0e1d-4079-83f5-f111025e86fc spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 44f505ad-cb90-4c8e-b9ee-9ff3686399f5 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to create # spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to destroy Hyrax::AdministrativeSet: b4c2da74-edb5-4a69-8457-359cbedaa5b8 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to edit Hyrax::AdministrativeSet: dda3c6d2-881c-48a8-a20c-3048e5341c31 spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates as admin behaves like A user with additional access is expected to be able to update Hyrax::AdministrativeSet: 62412e73-bf73-4636-92be-e3cd80e856e3 … ```

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