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

WINGS: FileMetadata and versioning #3923

Closed
elrayle opened this issue Aug 26, 2019 · 3 comments
Closed

WINGS: FileMetadata and versioning #3923

elrayle opened this issue Aug 26, 2019 · 3 comments
Labels
Milestone

Comments

@elrayle
Copy link
Contributor

elrayle commented Aug 26, 2019

Descriptive summary

The move to support valkyrie as the backend for Hyrax requires some reworking of the versioning for files.

Know places that need to be addressed

Other places may also need to be changed. But the following are known changes that are required.

Hyrax::FileMetadata resource (under app/models)

  • add an attributes to track past versions (e.g. attribute :version_ids, ::Valkyrie::Types::Set)
  • #versions method which returns all versions... something like
    def versions
      query_service = Valkyrie.config.metadata_adapter.query_service
      query_service.find_references_by(resource: self, property: :version_ids)
      # As written, this will return the ids.  So depending on use cases for this method, may need to create the resource objects for each id
    end

Hyrax::VersioningService

  • #perform_create_through_valkyrie method. It is pending completion of #indexing_adapter method.

Wings::FileMetadataBuilder service (under lib/wings/services)

  • #attach_file_metadata_to_valkyrie_file_set method. It makes a copy of passed in file_metadata excluding the id and at this writing member_ids.
    • By not copying the id, it is making a new version. Need to verify that this works as expected once other versioning code is updated.
    • The member_ids attribute was originally planned to hold the ids of the various versions. So, if it is correct to exclude past version ids here, whatever attribute was added to Hyrax::FileMetadata to hold the version ids (e.g. version_ids), is what should be excluded. It is possible that member_ids will have already been removed from that code by the time this issue is addressed. Also, there is an open question about how the version ids will get set in the new version being created by FileMetadataBuilder.
@elrayle elrayle added the wings label Aug 26, 2019
@elrayle elrayle self-assigned this Aug 28, 2019
@no-reply no-reply added this to the Wings milestone Sep 23, 2019
elrayle added a commit that referenced this issue Jan 27, 2020
…xt, thumbnail

2 changes here…

### Parts of FileSet

AF behavior #original_file, #extracted_text, and #thumbnail each return a single PCDM::File,  So this now has the methods that get these relatiionships from FileMetadata to return `.first`

### Versioning

Versioning was looking through to ActiveFedora through the original_file method defined in wings/hydra/pcdm/pcdm_valkyrization_behavior.  Since that was method was removed with the addition of Hyrax::FileSet#original_file, it was no longer getting the lookthrough behavior.  The tests related to versioning have been marked pending.  Issue #3923 addresses FileMetadata and versioning.
@no-reply
Copy link
Contributor

@rjkati is file versioning in the Hyrax QA script? i'm wondering whether there's prior work here, or why it hasn't been flagged as a release blocker so far.

@rjkati
Copy link

rjkati commented Aug 24, 2023

@no-reply file versioning is included in the QA script. To pass, users need to be able to upload a new version and restore a prior version.

I suspect that file versioning had not yet been tested, since filesets were not working properly until very recently.

@rjkati
Copy link

rjkati commented Aug 24, 2023

Per discussion at DSU, we are closing this ticket and opening new tickets for specific file versioning issues.

Uploading a new version is addressed in #6211 . Restoring a prior version cannot be tested until #6211 is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants