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

Do not retry 400 and print better error messages #5326

Merged
merged 1 commit into from Jun 10, 2019

Conversation

@lasote
Copy link
Contributor

@lasote lasote commented Jun 10, 2019

Changelog: Bugfix: Conan was retrying the upload when failed with error 400 (request error).
Changelog: Feature: Print nicer error messages when receive an error from Artifactory.
Docs: omit

Raised by Artifactory QA team, when trying to upload to a virtual repository (without configured deploy repo) we were retrying and not printing anymore the server error in the output:

At 1.15:

Error uploading file: conanfile.py, 'b'{\n  "errors" : [ {\n    "status" : 400,\n    "message" : "Unable to upload into a virtual Conan repository without default local deployment repository configured."\n  } ]\n}''

At 1.16:

Error uploading file: conanfile.py, '400 Client Error: Bad Request for url: http://artifactory:8081/artifactory/api/conan/conan-virtual/v2/conans/simple/1.0/user/channel/revisions/a20a0ec96d592dd6e90448b311856074/files/conanfile.py

From now on:

Error uploading file: conanfile.py, '400: Unable to upload into a virtual Conan repository without default local deployment repository configured.'
@lasote lasote added this to the 1.16.1 milestone Jun 10, 2019
@lasote lasote requested a review from memsharded Jun 10, 2019
output.writeln("")
if not response.ok:
Copy link
Contributor Author

@lasote lasote Jun 10, 2019

Choose a reason for hiding this comment

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

This code shouldn't be reached anymore.

Loading

self._output.writeln("")
if not response.ok:
Copy link
Contributor Author

@lasote lasote Jun 10, 2019

Choose a reason for hiding this comment

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

This code shouldn't be reached anymore.

Loading

Copy link
Member

@memsharded memsharded left a comment

Much better, indeed

Loading

@memsharded memsharded merged commit 1eca20b into conan-io:release/1.16.1 Jun 10, 2019
2 checks passed
Loading
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

2 participants