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

thumbnails and other derivatives were not stored in the path we expected them to be #6091

Conversation

orangewolf
Copy link
Member

@orangewolf orangewolf commented Jun 9, 2023

Fixes

Summary

Derivatives were stored in a pairtree using the first 5 non-dash items. But Hyrax expects them to be stored in a pairtree of the full id. This mismatch meant no derivatives could be found properly.

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

  • This is a Valkyrie only change.
  • Create a work with an attached file. After a minute or two the thumbnail should show

Type of change (for release notes)

  • Major Changes (Potentially breaking changes)
  • New Features
  • Deprecations
  • Bug Fixes
  • Valkyrie Progress
  • Documentation
  • Containerization

@samvera/hyrax-code-reviewers

@orangewolf orangewolf changed the base branch from main to 5794-download_file-redux June 9, 2023 22:53
…cted them to be. this was due to Valkyrie using a different pairtree method than Hyrax
@orangewolf orangewolf force-pushed the 5504-deriviatives-were-harder-to-find-than-wifes-headphones branch from b7ebda3 to fa1be2b Compare June 9, 2023 22:57
@@ -0,0 +1,25 @@
# frozen_string_literal: true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have subclassed the override here but Valkyrie::Storage::Disk::BucketStorage is a inner class. That makes me think it is best to replace instead of extend.

tmpfile.write stream.read
stream.rewind
output = tmpfile.write(stream.read)
tmpfile.flush
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the adapter does not flush the buffer first, so we need to make absolutely sure the file is in the tmp location.

@alishaevn alishaevn requested a review from dlpierce June 12, 2023 16:08
@alishaevn alishaevn changed the title thumbnails and other deriviatives were not stored in the path we expected them to be thumbnails and other derivatives were not stored in the path we expected them to be Jun 12, 2023
@dlpierce dlpierce merged commit 5189184 into 5794-download_file-redux Jun 12, 2023
@dlpierce dlpierce deleted the 5504-deriviatives-were-harder-to-find-than-wifes-headphones branch June 12, 2023 22:37
@dlpierce dlpierce added the notes-valkyrie Release Notes: Valkyrie specific label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-valkyrie Release Notes: Valkyrie specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate derivatives for FileSets when Valkyrie mode is enabled
2 participants