-
Notifications
You must be signed in to change notification settings - Fork 2
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
Do not show zero total file size for globus objects #3230
Comments
While we could put NA we actually do know the sizes so I would be in favor of fixing the problem. I believe that globus_client needs a new or adjusted method for returning files in a way that preserves the filename and file size. Then H2 needs to be modified to use it to persist the file size in addition to the file name. |
With what we learned in #3231 I think we need to:
|
It turns out globus_client already has a 3.2.0 :011 > GlobusClient.list_files(user_id: '[email protected]', path: 'katebar/work19057')
=> [#<struct GlobusClient::Endpoint::FileInfo name="/uploads/katebar/work19057/version1/bh979th0089.zip", size=4695>] |
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. Fixes #3230
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. Fixes #3230
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. Fixes #3230
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. Fixes #3230
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. Fixes #3230
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
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
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
For objects accessioned via globus and for which individual file sizes (either some or all in an object) are not available, we do not want to show 0 in the collection item list table. Instead we will show a message (TBD by Astrid, something like "not available*"), and then at the bottom of the page, we will have a legend indicating why it's not available (TBD something like "* = items deposited through Globus do not have file sizes computed")
Note it may be possible (based on #3231) for some files to have no file size and some files to have a file size. In this case, we still do no want to show the total object size, because it will not be accurate. So the determination of whether to show the total file size or not is not "0" but maybe if globus was used to upload files at any point (again, based on what we learn in #3231)
Note: do the investigation in #3231 first, because the results of that will determine how we implement this
The text was updated successfully, but these errors were encountered: