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

valkyrie: use storage adapters for derivatives #5626

Merged
merged 25 commits into from
Oct 24, 2022
Merged

valkyrie: use storage adapters for derivatives #5626

merged 25 commits into from
Oct 24, 2022

Commits on Oct 3, 2022

  1. use ValkyrieUpload for derivatives

    dunn authored and dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    d89817b View commit details
    Browse the repository at this point in the history
  2. valkyrie: fix thumbnail indexing, add controller(s) for inline files

    - make derivatives a named route for url helpers
    dunn authored and dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    16742b2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cdfc615 View commit details
    Browse the repository at this point in the history
  4. ValkyriePersistDerivatives: fix spec

    dunn authored and dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    e208a51 View commit details
    Browse the repository at this point in the history
  5. ValkyrieUpload: don't pass use to storage_adapter#upload

    it's not handled correctly, and sometimes passed directly to the underlying
    process (e.g., shrine)
    dunn authored and dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    eed7f39 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4e7d8ca View commit details
    Browse the repository at this point in the history
  7. ValkyrieUpload: remove find_or_create_metadata

    - restore file_identifier set
    dunn authored and dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    5442386 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a56af64 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a7cfb10 View commit details
    Browse the repository at this point in the history
  10. WIP: pull the file metadata from the adapter's query

    don't try to infer the id of the file metadata node. these resources are handled
    differently by different adapters, just making one with a file_identifer set
    doesn't do the trick.
    
    see, e.g., the usage here:
    https://github.com/samvera/hyrax/blob/main/spec/models/hyrax/file_metadata_spec.rb#L27-L43
    tamsin johnson authored and dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    718925c View commit details
    Browse the repository at this point in the history
  11. refactor Hyrax::ValkyrieUpload as Class to allow instances

    all but one of the arguments to `ValkyrieUpload` are arguments to a specific
    action (an upload), but the `storage_adapter` parameter is more stable and
    cumbersome to pass per upload.
    
    in the default case, this doesn't much matter, but when using one of the
    alternative adapters (e.g. for derivatives), we can reduce the dependencies for
    collaborator objects by allowing them to use a preconfigured instance of the
    upload service. e.g:
    
    ```ruby
    derivatives_uploader.upload(filename: 'test.txt', file_set: my_fs, io: StringIO.new('test'))
    ```
    
    instead of:
    
    ```ruby
    derivatives_adapter = Hyrax.config.derivatives_storage_adapter
    Hyrax::ValkyrieUpload.file(filename: 'test.txt', file_set: my_fs, io: StringIO.new('test'))
    ```
    tamsin johnson authored and dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    3bcf0b9 View commit details
    Browse the repository at this point in the history
  12. WIP: a blob of stuff.

    tamsin johnson authored and dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    3b2972f View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    36b4f8e View commit details
    Browse the repository at this point in the history
  14. fix ValkyrieIngestJob spec

    dunn authored and dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    287fd03 View commit details
    Browse the repository at this point in the history
  15. FileMetadata: don't freeze type array

    dunn authored and dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    56f665b View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    3560820 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    21fd043 View commit details
    Browse the repository at this point in the history
  18. Fix fileset id extraction

    Previously the final group of characters was not included in the extracted id.
    dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    a7b5951 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    ab879f7 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    69fd125 View commit details
    Browse the repository at this point in the history
  21. Always include has_model as reserved_attribute

    Attempting to resave a converted resource resulted in an error due to the attribute setter now being defined by ActiveFedora instead of ActiveTriples.
    dlpierce committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    19400e4 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    1e4b9ad View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    9965082 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2022

  1. Configuration menu
    Copy the full SHA
    880bfab View commit details
    Browse the repository at this point in the history
  2. Fix mock file responses

    Add mock ids to satisfy services that need ids.
    Include mock_thumbnail in file_ids
    thumbnail_path should include the fileset id
    dlpierce committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    8e6539e View commit details
    Browse the repository at this point in the history