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

WebDav: new remote type #1153

Closed
dmpetrov opened this issue Sep 22, 2018 · 16 comments · Fixed by #4256
Closed

WebDav: new remote type #1153

dmpetrov opened this issue Sep 22, 2018 · 16 comments · Fixed by #4256
Labels
feature request Requesting a new feature fs: webdav Related to the Webdav filesystem good first issue hacktoberfest help wanted p3-nice-to-have It should be done this or next sprint

Comments

@dmpetrov
Copy link
Member

WebDav is a quite common protocol for file sharing.

It is especially convenient because box.com provides 10Gb free and supports WebDav.

@jurasan
Copy link

jurasan commented Oct 16, 2018

I'd like to work on this. Could you give someone directions where to look in the code for similar functionality and correct place to implement this one.

@dmpetrov
Copy link
Member Author

@jurasan, in dvc/remote/ directory you can find code examples for S3, Azure and other remotes. WebDav should be just another remote for DVC.

@ghost ghost added the hacktoberfest label Oct 17, 2018
@jurasan
Copy link

jurasan commented Oct 28, 2018

Which branch should I work on?

@efiop
Copy link
Contributor

efiop commented Oct 28, 2018

@jurasan On master. Work on your dvc fork and send a PR when you are ready. Also please feel free to ping us if you need anything.

@ghost
Copy link

ghost commented Oct 29, 2018

@jurasan, in addition to @efiop response, we have a contributing guide that may help you with your PR: https://dvc.org/doc/user-guide/contributing/

@jurasan
Copy link

jurasan commented Oct 30, 2018

box.com drops support for WebDav
https://community.box.com/t5/Box-Product-News/Deprecation-WebDAV-Support/ba-p/55684

@jurasan
Copy link

jurasan commented Nov 2, 2018

I'm now looking for a good python webdav library supporting python 2.7.
I found this one, though it's not maintained for the last 2 years.
https://github.com/CloudPolis/webdav-client-python

Does anyone have experience with this or can hint any other library.

@efiop
Copy link
Contributor

efiop commented Nov 2, 2018

@jurasan Unfortunately I don't have much experience with WebDav 🙁 I'm sure you've already considered it, but https://pypi.org/project/fs.webdavfs/ looks a bit more promising, supports 2.7 and looks somewhat maintained as a part of https://github.com/PyFilesystem/pyfilesystem2 .

@jurasan
Copy link

jurasan commented Nov 2, 2018

Thanks. I actually managed to miss it somehow. Generally it seems, that WebDav is dying slowly and we're lucky to at least have those.

@efiop
Copy link
Contributor

efiop commented Nov 2, 2018

@jurasan I agree. Do you plan on using webdav driver yourself(if so, with which storage provider?), or are you working on a patch for fun?

@jurasan
Copy link

jurasan commented Nov 2, 2018

We have our internal company cloud that uses WebDav

@efiop
Copy link
Contributor

efiop commented Nov 2, 2018

Ah, I see. Please don't hesitate to ping us if you need any help.

@garylschultz
Copy link

This is still of interest, as I've got a project that is pushing to use Citrix ShareFile, which supports WebDav. Is WebDav support still actively being worked on?

@efiop
Copy link
Contributor

efiop commented Jul 25, 2019

@garylschultz Our core team is not working on this (at least yet). But @jurasan seems to have been working on his patch, I'm not sure what state it is in though 🙁 @jurasan Maybe you need some help? Also, maybe @garylschultz will be willing to help out too 🙂

@efiop efiop added p3-nice-to-have It should be done this or next sprint and removed p4 labels Sep 25, 2019
@gw0
Copy link

gw0 commented Nov 15, 2019

WebDAV support would also enable the use of private file-hosting solutions, like Nextcloud, Owncloud, and others.

@shizacat
Copy link

Hi,
I try to create the remote - webdav and saw interesting thing. She different from remote http only one string - upload need method PUT

Example in PR

But that need change base - schema change to http.

iksnagreb pushed a commit to iksnagreb/dvc that referenced this issue Jul 27, 2020
Webdav support is based on https://pypi.org/project/webdavclient3/ and
supports basic download/upload operation, directory creation as well as
existence, file hash and isdir query. Copy, move and remove are also
implemented, though probably not used yet.

WebdavURLInfo is taken from https://github.com/shizacat/dvc/tree/remote-webdav

Fixes iterative#1153
iksnagreb added a commit to iksnagreb/dvc that referenced this issue Jul 27, 2020
Webdav token auth, certificate and key path and connection timeout are
configurable. Webdav username might be specified or extracted from URL.

Refs iterative#1153
iksnagreb added a commit to iksnagreb/dvc that referenced this issue Jul 27, 2020
iksnagreb added a commit to iksnagreb/dvc that referenced this issue Jul 27, 2020
iksnagreb added a commit to iksnagreb/dvc that referenced this issue Jul 27, 2020
This enables the WebDAV api location (e.g. '/public.php/webdav') to be
part of the remote 'url' configuration instead of beeing specified
separately via the 'root' option. The 'root' option may then be used to
specify real directories at the WebDAV storage, although using it to
set the api location is still possible.

Refs iterative#1153
iksnagreb added a commit to iksnagreb/dvc that referenced this issue Jul 27, 2020
The WebDAV 'root' option was rather confusing and should be handled by
the initial 'path_info' from the config 'url' option.

Context: iterative#4256 (comment)

While stripping the path/root from the hostname the port got lost, which
is fixed now by simply using the URLInfo 'replace' method as suggested.

Context: iterative#4256 (comment)

The WebDAV client connection is tested by probing the existence of the
root (self.path_info.path).

Refs iterative#1153
iksnagreb added a commit to iksnagreb/dvc that referenced this issue Jul 27, 2020
iksnagreb added a commit to iksnagreb/dvc that referenced this issue Jul 27, 2020
iksnagreb added a commit to iksnagreb/dvc that referenced this issue Jul 27, 2020
efiop pushed a commit that referenced this issue Jul 29, 2020
* tree,remote: add support for webdav

Webdav support is based on https://pypi.org/project/webdavclient3/ and
supports basic download/upload operation, directory creation as well as
existence, file hash and isdir query. Copy, move and remove are also
implemented, though probably not used yet.

WebdavURLInfo is taken from https://github.com/shizacat/dvc/tree/remote-webdav

Fixes #1153

* tree,remote: add further webdavclient3 options

Webdav token auth, certificate and key path and connection timeout are
configurable. Webdav username might be specified or extracted from URL.

Refs #1153

* tree,remote: validate webdav client configuration

Refs #1153

* tree,remote: WebDAV is written with capitalized 'DAV'...

Refs #1153

* tree,remote: terminate WebDAV makedirs at self.path_info.path

This enables the WebDAV api location (e.g. '/public.php/webdav') to be
part of the remote 'url' configuration instead of beeing specified
separately via the 'root' option. The 'root' option may then be used to
specify real directories at the WebDAV storage, although using it to
set the api location is still possible.

Refs #1153

* tree,remote: use >=3.14.5 for WebDAV dependency webdavclient3

Context: #4256 (comment)

Refs #1153

* tree,remote: get rid of WebDAV 'root' option and add connection check

The WebDAV 'root' option was rather confusing and should be handled by
the initial 'path_info' from the config 'url' option.

Context: #4256 (comment)

While stripping the path/root from the hostname the port got lost, which
is fixed now by simply using the URLInfo 'replace' method as suggested.

Context: #4256 (comment)

The WebDAV client connection is tested by probing the existence of the
root (self.path_info.path).

Refs #1153

* tree,remote: implement walk_files for WebDAV

Context: #4256 (comment)

Refs: #1153

* tree,remote: let WebDAV client list query file info in walk_files

Context: #4256 (comment)

Refs #1153

* tree,remote: add some unit tests for WebDAVTree

Refs #1153

* tree,remote: use ConfigError for WebDAVTree and move Error to webdav.py

Context: #4256 (comment)

Refs #1153

* tree,remote: remove/change some (unnecessary) comments

Context: #4256 (comment)

* tree,remote: uploading to WebDAV only create directories if not exist

* tree,remote: add BaseTree parameter use_dvcignore to WebDAVTree exists

Refs iterative/#1153

* tree,remote: remove WebDAVTree copy method as proposed

Context: #4256 (comment)

Refs #1153

* tree,remote: add progress bar to WebDAV _download and _upload method

Context: #4256 (comment)

Refs #1153

Co-authored-by: Christoph Berganski <christoph.berganski@uni-bielefeld.de>
@skshetry skshetry added the fs: webdav Related to the Webdav filesystem label Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requesting a new feature fs: webdav Related to the Webdav filesystem good first issue hacktoberfest help wanted p3-nice-to-have It should be done this or next sprint
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants