Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove reliance on noid for find #6924

Merged
merged 3 commits into from
Oct 16, 2024
Merged

Conversation

laritakr
Copy link
Contributor

@laritakr laritakr commented Oct 14, 2024

Fixes

Switches valkyrie can-can adapter from using noids to using a fallback... look first by id, and then by alternate_identifier instead.

When creating a work in dassie with VALKYRIE_TRANSITION=true, I was unable to edit the work because it doesn’t have an alternative identifier.

Summary

Switches method of finding a by id in the can-can adapter.

Guidance for testing, such as acceptance criteria or new user interface behaviors:

use VALKYRIE_TRANSITION=true
create a new work (it will be in Valkyrie)
select edit
Work should be found and able to be edited.

Type of change (for release notes)

  • notes-bugfix Bug Fixes

Detailed Description

While we might expect noids to be enabled when using VALKYRIE_TRANSITION=true, having it enabled means that we can't create native Valkyrie resources and then edit them. This change allows a simple fallback to find the work, where we first look by id, and then fallback to look by alternative identifier.

Changes proposed in this pull request:

  • Switches method of finding a by id in the Valkyrie can-can adapter.

@samvera/hyrax-code-reviewers

@laritakr laritakr added the notes-bugfix Release Notes: Fixed a bug label Oct 14, 2024
Copy link

github-actions bot commented Oct 14, 2024

Test Results

    17 files  ±0      17 suites  ±0   2h 19m 42s ⏱️ +59s
 6 714 tests ±0   6 417 ✅ ±0  297 💤 ±0  0 ❌ ±0 
13 198 runs  ±0  12 802 ✅ ±0  396 💤 ±0  0 ❌ ±0 

Results for commit 1c8b933. ± Comparison against base commit 13b6c9e.

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 #<Hyrax::PermissionTemplate:0x00007f00b5ae9b08>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007fb575948ae0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f00b53e1a40>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007fb575636550>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: ebe18335-2ef0-46b0-b71d-806c23baa117
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: c5239bdf-d994-4f98-9b09-4ae0df3ad25b
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 88f4afa5-cbda-41e9-b78c-0660a05e0e1d
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: 7b86b2d4-1db2-4ee8-a391-f5374a4a1336
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: 2baf0f67-3ad3-4569-8e82-e33c238551a1
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: b09f0542-2b46-4715-8db4-6fe1d46a7c7e
…
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f5730986910>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007fd1c6d2ab50>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f5730923860>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007fd1c6af08d0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 4a5cb385-3b2b-42a4-ad71-993b5107f8bf
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: c02bceb1-f2ff-4de1-8a21-b41227229a8f
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: b1e1970c-0100-43a5-8619-584afe7fb9f5
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit Hyrax::AdministrativeSet: c2b1e5cb-d981-48ae-8775-8a649f384b68
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update AdminSet: 3109cf8b-05b1-441f-8932-10165cfde049
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to update Hyrax::AdministrativeSet: 8c58eede-6fc6-4582-afb8-835a05476a98
…

♻️ This comment has been updated with latest results.

Switches from using noids to using a fallback... look first by id,
and then by alternate_identifier instead.

I created a work in dassie with VALKYRIE_TRANSITION=true and then I was
unable to edit the work because I don’t have an alternative identifier.
@laritakr laritakr force-pushed the can-can-does-not-rely-on-noids branch 4 times, most recently from 25113a7 to a27e04c Compare October 15, 2024 21:43
@laritakr laritakr force-pushed the can-can-does-not-rely-on-noids branch from a27e04c to 5bee72d Compare October 15, 2024 21:44
@orangewolf orangewolf merged commit 0f522be into main Oct 16, 2024
22 checks passed
@orangewolf orangewolf deleted the can-can-does-not-rely-on-noids branch October 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-bugfix Release Notes: Fixed a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants