Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Support uploading to v2 endpoint #38

Closed
stevepeak opened this issue Jun 25, 2018 · 4 comments
Closed

Support uploading to v2 endpoint #38

stevepeak opened this issue Jun 25, 2018 · 4 comments

Comments

@stevepeak
Copy link

For enterprise customers there are cases when v4 endpoint is not available. Please add the v2 endpoint as a backup for 405 errors to v4.

Directions are here: https://github.com/codecov/codecov-bash/blob/master/codecov#L1524-L1538

Thanks!

@AdmiringWorm AdmiringWorm added this to the 1.1.0 milestone Jun 26, 2018
@AdmiringWorm
Copy link
Collaborator

Just trying to figure out what really is needed to change from the v4 url.

  • Changing to v2 url (of course)
  • Changing the 'Content-Type' to 'text/plain'
  • Adding 'X-Content-Encoding: gzip'
  • Adding 'Accept: text/plain'
  • Changing from 'PUT' method to 'POST' method.
  • Should only upload with v2 if v4 fails with HTTP Status 405

Is the above correct, or have I missed something?

@stevepeak
Copy link
Author

Hey @AdmiringWorm 👋 I do believe you have it correct 👍

@AdmiringWorm AdmiringWorm modified the milestones: 1.1.0, 1.2.0 Sep 12, 2018
@snaggled
Copy link

+1

@AdmiringWorm AdmiringWorm modified the milestones: 1.2.0, 1.3.0 Feb 4, 2019
@AdmiringWorm AdmiringWorm modified the milestones: 1.3.0, 1.4.0 Feb 28, 2019
@AdmiringWorm AdmiringWorm modified the milestones: 1.4.0, 1.5.0 Apr 7, 2019
@AdmiringWorm AdmiringWorm modified the milestones: 1.5.0, Future May 4, 2019
@AdmiringWorm AdmiringWorm modified the milestones: Future, 1.6.0 Jun 12, 2019
AdmiringWorm added a commit that referenced this issue Jun 14, 2019
* feature/v2-upload-service:
  (GH-38) Implement ability to fall back to v2 url
  (GH-38) Add fallback values to Route and url
@AdmiringWorm
Copy link
Collaborator

This have now finally been implemented in the codebase, and will be part of the next release (1.6.0).

It will try the v2 url when the v4 url fails, no matter the response code returned when trying to use the v4 url. (A major restructuring would be needed to be able to implement the fallback only if server returns status code 405).

AdmiringWorm added a commit that referenced this issue Jul 15, 2019
* release/1.6.0:
  (maint) Fixed additional issues detected by InspectCode
  (maint) Fixed stylecop issues + updated editorconfig file with vs settings
  (maint) Ran codemaid cleanup + Re-Organizer
  (GH-67) Changed codecov nuget package to include the compiled warp binaries
  (GH-66) Update build file to create self-contained application using warp
  (GH-38) Implement ability to fall back to v2 url
  (GH-38) Add fallback values to Route and url
  (build) Remove verbose logging during ci builds
  (maint) Change uploaders to use the new CodecovUploader class
  (GH-70) Chang WebClient uploader to use HttpClient
  (maint) Remove HttpWebRequest uploader
  (maint) Add helper method to get rid of duplicated code lines
  (maint) Corrected variable name for travis detection
  (build) add coverlet and customized codecov tasks support
  (build) add travis build script
  (GH-65) Add implementation of Travis CI detector
  (GH-65) Add unit tests for implementation of Travis CI detector
  (GH-52) change exit code to 160 when invalid arguments is used
  Add glob pattern support to -f parameter (#69)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants