Skip to content

Add support for PUT method for remote http storage #4248

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

Closed
em2er opened this issue Jul 20, 2020 · 8 comments
Closed

Add support for PUT method for remote http storage #4248

em2er opened this issue Jul 20, 2020 · 8 comments
Labels
feature request Requesting a new feature p3-nice-to-have It should be done this or next sprint

Comments

@em2er
Copy link

em2er commented Jul 20, 2020

Binaries management web-services such as Artifactory or Sonatype Nexus use PUT method to deploy file over http. For now, dvc supports only POST method. It would be great if some kind of support of PUT method added. For example, by adding parameter 'method' to config:

dvc remote add -d origin https://artifactory.company/artifactory/dvc-local/
dvc remote modify origin http_method put
@ghost ghost added the triage Needs to be triaged label Jul 20, 2020
@efiop efiop added feature request Requesting a new feature p3-nice-to-have It should be done this or next sprint labels Jul 20, 2020
@ghost ghost removed the triage Needs to be triaged label Jul 20, 2020
@efiop
Copy link
Contributor

efiop commented Jul 20, 2020

@em2er
Copy link
Author

em2er commented Jul 20, 2020

I've just replaced POST with PUT at

response = self.request("POST", to_info.url, data=chunks())
locally and it works fine with Artifactory

@efiop
Copy link
Contributor

efiop commented Jul 20, 2020

For the record: probably the best choice is to try PUT by default and fallback to POST if it is not supported (405 code).

@shcheklein
Copy link
Member

@efiop this way we'll be doing a lot of extra operations? or should we try once and remember the choice?

@efiop
Copy link
Contributor

efiop commented Jul 20, 2020

@shcheklein Remember the choice, yes.

@ClementWalter
Copy link
Contributor

I plan to use artifactory with dvc, still required? I could work on it ASAP

@efiop
Copy link
Contributor

efiop commented Mar 24, 2021

@ClementWalter Sure, let us know if you need any help. Thanks for trying it out! 🙏

@skshetry
Copy link
Collaborator

skshetry commented Mar 24, 2021

Closing as this is already implemented on #4553.

The http method could be modified as follows:

$ dvc remote modify myremote method PUT

Please check the docs for more information: https://dvc.org/doc/command-reference/remote/modify#available-parameters-per-storage-type

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 p3-nice-to-have It should be done this or next sprint
Projects
None yet
Development

No branches or pull requests

5 participants