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

Client with apiv2 (transfers in one step) #3442

Merged
merged 15 commits into from Sep 14, 2018

Conversation

@lasote
Copy link
Contributor

@lasote lasote commented Aug 30, 2018

  • Extracted from #3055
  • ApiV2 for client
  • Note: If it is merged in 1.8, any client running against a (>=1.8) conan server will use apiv2.

Confirmed that our Downloader class follows correctly the 302 downloads redirects.

Changelog: Feature: Experimental and initial support for the REST apiv2 that will allow transfers in one step and revisions in the future.

@lasote lasote added this to the 1.8 milestone Aug 30, 2018
@ghost ghost assigned lasote Aug 30, 2018
@ghost ghost added the stage: review label Aug 30, 2018
@lasote lasote changed the title [Only CI] Feature/api v2 client Client with apiv2 (transfers in one step) Aug 30, 2018
@lasote lasote requested review from memsharded, danimtb and jgsogo Aug 30, 2018
Copy link
Member

@memsharded memsharded left a comment

Looks very good, though I don't know if should be released as default, but rather as an opt-in in conan_server.

danimtb
danimtb approved these changes Sep 4, 2018
@lasote
Copy link
Contributor Author

@lasote lasote commented Sep 5, 2018

Pending:

  • Remove "revisions" from server config
  • Remove md5 return in apiv2? Related to #3480
  • Add client management for 302 redirects on downloads? Not needed, requests do it automatically.

@lasote
Copy link
Contributor Author

@lasote lasote commented Sep 13, 2018

Please, review again @memsharded

  • Merged develop with manifest comparison included.
  • Server not using md5 for apiv2 and snapshot returning only lists of files.
  • Server conf revisions removed from config
  • Renamed some get_conan_snapshot to get_recipe_snapshot
  • Refactor of upload code to share all the new logic except the upload mechanism itself (1 step vs 2 steps)

@@ -17,13 +17,13 @@ def attach_to(self, app):
@app.route(r.package, method=["GET"])
@app.route(r.package_recipe_revision, method=["GET"])
@app.route(r.package_revision, method=["GET"])
def get_package_snapshot(name, version, username, channel, package_id, auth_user,
revision=None, p_revision=None):
def get_package_file_list(name, version, username, channel, package_id, auth_user,
Copy link
Member

@memsharded memsharded Sep 13, 2018

Maybe convert it to a dict {file: {} }, to be extensible for the future. Can be {file: None} now, but that it will understand in the future:

{file = {size=12355, md5=012312312, ...},
 file2 = {....}

@lasote lasote merged commit e0fc321 into conan-io:develop Sep 14, 2018
2 checks passed
@ghost ghost removed the stage: review label Sep 14, 2018
grisumbras pushed a commit to grisumbras/conan that referenced this issue Dec 27, 2018
* Failing hard

* Fixed v2 without revisions

* Runner equal

* typo

* typo

* Fixing test apiv2

* Fix test

* Merged with develop

* fixed jenkins conf

* Renamed method

* Prepared to work easier with revision and speculative metadata for files introduced in apiv2

* Fixing managing dict snapshot

* Force CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants