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

Extra embargo and lease objects in hyrax 3 #5902

Open
bbpennel opened this issue Oct 19, 2022 · 2 comments
Open

Extra embargo and lease objects in hyrax 3 #5902

bbpennel opened this issue Oct 19, 2022 · 2 comments
Assignees
Labels
bug help requested Something about this issue/PR requires help from others
Milestone

Comments

@bbpennel
Copy link
Contributor

Descriptive summary

When testing Hyrax 3.4.2 with the dassie development docker container, if I create a Generic Work with access set to Public and then query solr, it appears that an embargo and a lease object are created for the new work. There are also fcrepo objects for the embargo and lease.

I initially encountered this situation as part of our ongoing Hyrax 2.9.6 to 3.4.2 migration. One of our feature tests was creating 2 works and then counting the number of solr records, and the expectation from Hyrax 2.9.6 no longer matched the count in 3.x. It changed from 7 to 11 records, where there were 2 embargo and 2 lease objects, which hadn't been requested.

I have not tested with Hyrax 4 or main, so I do not know if the problem is present there or not. @no-reply suggested it may be a Wings bug.

Rationale

It seems undesirable to produce additional nodes in Fedora and Solr if they are not needed.

Expected behavior

Only create embargo and lease objects when they are requested.

Actual behavior

It creates the embargo/lease objects.

Steps to reproduce the behavior

Start an instance of the development docker container on hyrax 3.x (may need to patch the Gemfile due to a dependency issue)

Log in as an admin.

Create a Generic work with access set to Public.

Perform a blank query in solr, there should be two entries like the following:

      {
        "system_create_dtsi":"2022-10-19T21:13:55Z",
        "system_modified_dtsi":"2022-10-19T21:13:55Z",
        "has_model_ssim":["Hydra::AccessControls::Embargo"],
        "id":"bf902488-549a-46d0-ae80-5f325aac3f19",
        "_version_":1747152048375201792,
        "timestamp":"2022-10-19T21:13:55.390Z",
        "score":1.0},
      {
        "system_create_dtsi":"2022-10-19T21:13:55Z",
        "system_modified_dtsi":"2022-10-19T21:13:55Z",
        "has_model_ssim":["Hydra::AccessControls::Lease"],
        "id":"5387b3be-f1c6-45cd-83a3-0de7b8f424f7",
        "_version_":1747152048671948800,
        "timestamp":"2022-10-19T21:13:55.674Z",
        "score":1.0},

Here is the fcrepo record for the embargo

<http://localhost:8080/rest/dev/bf/90/24/88/bf902488-549a-46d0-ae80-5f325aac3f19>
        rdf:type               fedora:Container ;
        rdf:type               fedora:Resource ;
        fedora:lastModifiedBy  "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:createdBy       "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:created         "2022-10-19T21:13:55.314Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        fedora:lastModified    "2022-10-19T21:13:55.314Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        ns001:hasModel         "Hydra::AccessControls::Embargo"^^<http://www.w3.org/2001/XMLSchema#string> ;
        rdf:type               ldp:RDFSource ;
        rdf:type               ldp:Container ;
        fedora:writable        "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
        fedora:hasParent       <http://localhost:8080/rest/dev> .
@jlhardes jlhardes modified the milestones: 3.x series, 4.x Series Oct 21, 2022
@jlhardes jlhardes added help requested Something about this issue/PR requires help from others bug labels Oct 21, 2022
@fritzfreiheit fritzfreiheit self-assigned this Feb 22, 2023
@fritzfreiheit
Copy link
Contributor

This is a problem with the underlying ActiveFedora implementation. I'm going to open a ticket to fix it in ActiveFedora.

@fritzfreiheit
Copy link
Contributor

Created issue in ActiveFedora: samvera/active_fedora#1495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help requested Something about this issue/PR requires help from others
Projects
None yet
Development

No branches or pull requests

3 participants