[SVCS-269] Add readonly provider for OneDrive#205
Closed
felliott wants to merge 5 commits intoCenterForOpenScience:developfrom
Closed
[SVCS-269] Add readonly provider for OneDrive#205felliott wants to merge 5 commits intoCenterForOpenScience:developfrom
felliott wants to merge 5 commits intoCenterForOpenScience:developfrom
Conversation
* This commit squashes ~100 commits by @caseyrygt. Selected commit messages: * upgraded to python 3.5 * metadata: returns 400 as well when new file does not exist; * updated OneDrive for v1: add can_duplicate_names method to providers Related: [#OSF-5226] * fixed exception when renaming a folder; child data does not appear to be needed either when intra_move is called on a folder * onedrive copy call successful but need to wire up async handler to get status * implement revalidate_path to support Download as Zip * added resp.release() to methods that did not call .json() so connections are released; * added await asycio.sleep(4) so that the copy process will check for a status update for up to 90 seconds before giving up. * Added OneDrive API links as docstrings. * Fix my math; WB will poll OneDrive every 5 seconds for up to 18 times (90 seconds) * intra_copy: move iteration and sleep intervals to settings file; * added OneDrivePath class to encapsulate file path handling with OneDrive. * fix downloads of text files by disabling encoding from onedrive server * added error message if onedrive is being slow on copy
* If the resource root is not the same as the provider root, then we need to do some extra validation to make sure the user isn't requesting a file outside the configured resource root. OneDrive doesn't give us the parent pieces all at once, so we need to fetch the resource root and compare it to the path data. Assuming the request is valid, we need to take care to construct a proper OneDrivePath object, where the first path part is named '' and has the resource_root id, and all the remain parts are children of it. * add documentation, tests, test fixtures * standardize logging
de0686c to
87f1eb1
Compare
This was referenced Aug 29, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add support for a read-only OneDrive provider to WaterButler.
Changes
Write support was backed out in b634ac8 and will be added back later.
Side effects
None expected.
Ticket
[#SVCS-269] - JIRA
No OSF-side PR is up yet. Corresponding branch is https://github.com/felliott/osf.io/tree/feature/onedrive
Extends and supersedes #151.
Because I'm an idiot, I forgot to build off #177 and ended up duplicating a lot of the work @alexandr-melnikov-dev-pro did. I've rebased his changes and archived them in the https://github.com/felliott/waterbutler/tree/feature/onedrive-rw branch for when we add back write support.