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

Persist Globus file size #3256

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Persist Globus file size #3256

wants to merge 1 commit into from

Conversation

edsu
Copy link
Contributor

@edsu edsu commented Jul 17, 2023

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.rb and h2_object_creation_spec.rb against stage H2 and they both passed. I ran rake cleanup:file_sizes on 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. ⚡

@edsu edsu force-pushed the t3230-zero-size branch 6 times, most recently from fad5bff to c2520a2 Compare July 18, 2023 21:11
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not show zero total file size for globus objects
1 participant