Draft
Conversation
fad5bff to
c2520a2
Compare
Modify the FetchGlobusJob to use GlobusClient.list_files instead of GlobusClient.get_filenames so that it can get access to the file sizes as well as the file names. GlobusService.download_chunk needed to be defined as a no-op or else the call to attach the blob throws a NotImplementedError when it tries to identify the content type of a blob with a non-zero size. Also add a cleanup:file_sizes rake task for updating the 0 file sizes using the size stored in SDR. Fixes #3230
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why was this change made? 🤔
Modify the FetchGlobusJob to use GlobusClient.list_files instead of GlobusClient.get_filenames so that it can get access to the file sizes as well as the file names.
GlobusService.download_chunk needed to be defined as a no-op or else the call to attach the blob throws a NotImplementedError when it tries to identify the content type of a blob with a non-zero size.
Also add a cleanup:file_sizes rake task for updating the 0 file sizes using the size stored in SDR.
Fixes #3230
How was this change tested? 🤨
Manual testing a Globus deposit on QA showed that the byte size was correctly stored. I ran
h2_globus_creation_spec.rbandh2_object_creation_spec.rbagainst stage H2 and they both passed. I ranrake cleanup:file_sizeson QA.⚡ ⚠ If this change involves consuming from or writing to another service (or shared file system), run integration test create_object_h2_spec.rb and/or test manually in [stage|qa] environment, in addition to specs. ⚡
Does your change introduce accessibility violations? 🩺
⚡ ⚠ Please ensure this change does not introduce accessibility violations (at the WCAG A or AA conformance levels); if it does, include a rationale. See the Infrastructure accessibility guide for more detail. ⚡