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

[ENG-337] [OATHPIT] Throw ownCloud into the Oath Pit #386

Conversation

cslzchen
Copy link
Contributor

@cslzchen cslzchen commented Nov 6, 2019

Ticket

https://openscience.atlassian.net/browse/ENG-337

Purpose

Enable and update the ownCloud provider for aiohttp 3.

Changes

  • WB .make_request() now supports WebDAV methods
    • aiohttp.ClientSession only has functions available for native HTTP methods. For WebDAV (a protocol that extends HTTP) ones, WB lets the ClientSession instance call _request() directly and then wraps the return object with aiohttp.client._RequestContextManager.

  • WB client session now supports customized connector
    • For providers that use a customized connector such as owncloud, the new session is created (if no session is found in the event loop) with the given connector while an existing session simply ignores (and closes) the new connector. Given that the session is per loop for each instance, the existing session if found must already have a connector with qualified customizations.

Side effects

No

QA Notes

Here is a list of tests that I have done locally, all of which have passed. Extra notes and quirks are added under each list if there is any. In addition, tests are done for both non-root and root.

  • Getting metadata for a file and folder

    • This is automatic when you list files and expand folders
  • Downloading (20B, 1 MB, 11 MB, 88 MB, 264MB)

  • Contiguous Uploading (20B, 1 MB, 11 MB, 88 MB, 264MB one-by-one and together)

    • Chunked upload: N / A
  • DAZ (a folder containing five files of 20B, 1 MB, 11 MB, 88 MB, 264MB)

  • Delete a file and a folder; delete multiple files and folders

  • Folder creation and deletion

  • Renaming files and folders

    • After renaming a folder or file (successfully), clicking on the renamed folder triggers the following error. Please see the video attachment in the ticket.

click-on-an-renamed-file-or-folder

  • Intra move and copy

    • ownCloud supports intra move / copy. My local tests includes moving file and folders between two ownCloud projects with the same ownCloud account.
  • Inter move and copy

    • Between ownCloud and OSFStorage
    • Between ownCloud and another 3rd-party (S3 in this case)
  • Comments persist with moves

  • Revisions: N / A

  • Project root is storage root vs. a subfolder

    • Not required but I still tested this since I have to create two projects (one with root and the other with subfolder) anyway for testing intra copy / move.
  • Updating a file

Deployment Notes

N / A

aiohttp.ClientSession only has functions available for native HTTP
methods. For WebDAV (a protocol that extends HTTP) ones, WB lets
the ClientSession instance call _request() directly and then wraps
the return object with aiohttp.client._RequestContextManager.
For providers that use a customized connector such as owncloud,
the new session is created (if no session is found in the event
loop) with the given connector while an existing session simply
ignores (and closes) the new connector. Given that the session
is per loop for each instance, the existing session if found
must already have a connector with qualified customizations.
@coveralls
Copy link

coveralls commented Nov 6, 2019

Coverage Status

Coverage increased (+2.6%) to 56.968% when pulling 2aaf760 on cslzchen:feature/oathpit-owncloud into 12f540a on CenterForOpenScience:feature/oathpit.

Copy link
Contributor Author

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

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

Looks good. Will merge soon after another round of local testing.

waterbutler/core/provider.py Show resolved Hide resolved
waterbutler/settings.py Show resolved Hide resolved
waterbutler/core/provider.py Show resolved Hide resolved
@cslzchen cslzchen merged commit 2aaf760 into CenterForOpenScience:feature/oathpit Nov 14, 2019
@cslzchen cslzchen deleted the feature/oathpit-owncloud branch January 13, 2020 18:34
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.

None yet

2 participants