Skip to content

Persist Globus file size#3256

Draft
edsu wants to merge 1 commit intomainfrom
t3230-zero-size
Draft

Persist Globus file size#3256
edsu wants to merge 1 commit intomainfrom
t3230-zero-size

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
@edsu edsu force-pushed the t3230-zero-size branch from c2520a2 to d959428 Compare July 19, 2023 14:52
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