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

HydroShare Bulk Upload #3032

Merged
merged 2 commits into from
Nov 29, 2018
Merged

HydroShare Bulk Upload #3032

merged 2 commits into from
Nov 29, 2018

Conversation

rajadain
Copy link
Member

@rajadain rajadain commented Nov 21, 2018

Overview

Previously we uploaded files one by one to HydroShare. When overwriting, we would have to check if the file existed and delete it before uploading the same file again. This took a long time, slowed by the need to make three calls per file.

With the new "unzip overwrite" functionality introduced in hydroshare/hydroshare#2943, we can do "bulk uploads" by zipping all the files into one archive, sending that once, and unzipping on HydroShare, overwriting any existing files.

This reduces the time taken to do a HydroShare Export.

Connects #3016

Notes

For some reason, mmw_project_snapshot.json is deleted, not overwritten, on subsequent uploads. This is being discussed here: hydroshare/hydroshare#2860 (comment).

Testing Instructions

  • Ensure you are setup for working with HydroShare (talk to me if you're not)
  • Check out this branch and restart Celery
    vagrant ssh worker -c 'sudo service celeryd restart'
    
  • Create a new project and export it to HydroShare
    • Ensure that the project is created in HydroShare
    • Ensure the modal links to the new project in HydroShare
    • Ensure it has a CSV for every table, a GeoJSON and Shapefile for the area of interest, a GMS file for every MapShed scenario, the MMW Spreadsheet, and a mmw_project_snapshot.json file
  • Export the project again
    • Ensure it succeeds
    • Ensure all files are still in HydroShare
  • Add a new scenario and export again
    • Ensure the new scenario files are exported to HydroShare
  • Change a scenario and export again
    • Ensure the scenario files in HydroShare are updated to reflect changes

Previously we uploaded files one by one to HydroShare. When
overwriting, we would have to check if the file existed and
delete it before uploading the same file again. This took a
long time, slowed by the need to make three calls per file.

With the new "unzip overwrite" functionality introduced in
hydroshare/hydroshare#2943, we can do "bulk uplaods" by
zipping all the files into one archive, sending that once,
and unzipping on HydroShare, overwriting any existing files.

This reduces the time taken to do a HydroShare Export.
@rajadain rajadain force-pushed the tt/hydroshare-export-bulk-upload branch from 115de35 to 04d1201 Compare November 21, 2018 20:11
@rajadain
Copy link
Member Author

This is now ready for testing, as the bug encountered (and described in the Notes section above) has been remedied: hydroshare/hydroshare#2860 (comment)

@kellyi
Copy link
Contributor

kellyi commented Nov 29, 2018

Had some trouble getting HydroShare set up. Reassigning to @caseycesari so that I don't block this one.

@kellyi kellyi requested review from caseycesari and removed request for kellyi November 29, 2018 14:22
@kellyi kellyi assigned caseycesari and unassigned kellyi Nov 29, 2018
Copy link
Member

@caseycesari caseycesari left a comment

Choose a reason for hiding this comment

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

Everything worked without issue! Nice job.

@caseycesari caseycesari assigned rajadain and unassigned caseycesari Nov 29, 2018
@rajadain
Copy link
Member Author

Thanks! Merging this now.

@rajadain rajadain merged commit caf29ee into develop Nov 29, 2018
@rajadain rajadain deleted the tt/hydroshare-export-bulk-upload branch November 29, 2018 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants