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

Coverage fails at submit_local. #301

Closed
1ozturkbe opened this issue Feb 11, 2021 · 1 comment
Closed

Coverage fails at submit_local. #301

1ozturkbe opened this issue Feb 11, 2021 · 1 comment

Comments

@1ozturkbe
Copy link

1ozturkbe commented Feb 11, 2021

Hello folks,

I have recently gotten errors on a perfectly normal Codecov.submit_local call, and I can't figure out why. I would appreciate it if you could help me figure it out. It seems like the coverage gets everything right when I call the following:

global PROJECT_ROOT = @__DIR__
ENV["CODECOV_TOKEN"]=...
using Coverage
coverage = process_folder()

But when it comes to Codecov.submit_local(coverage), it throws the following error:

julia> Codecov.submit_local(coverage)
[ Info: Submitting data to Codecov...
ERROR: HTTP.ExceptionRequest.StatusError(406, "POST", "/upload/v2?&branch=curvedemo4&token=TOKENHERE&commit=b7fc2061cff4f8630dfd26b93a43806671fbf0c6", HTTP.Messages.Response:
"""
HTTP/1.1 406 Not Acceptable
server: envoy
date: Thu, 11 Feb 2021 22:40:15 GMT
content-type: text/plain; charset=utf-8
allow: GET, POST, HEAD, OPTIONS
x-frame-options: SAMEORIGIN
content-length: 101
vary: Origin
x-envoy-upstream-service-time: 5
Via: 1.1 google
Alt-Svc: clear

{'detail': ErrorDetail(string='Could not satisfy the request Accept header.', code='not_acceptable')}""")
Stacktrace:
 [1] #request#1(::Base.Iterators.Pairs{Symbol,Union{Nothing, Bool},Tuple{Symbol,Symbol},NamedTuple{(:iofunction, :reached_redirect_limit),Tuple{Nothing,Bool}}}, ::Function, ::Type{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}, ::URIs.URI, ::Vararg{Any,N} where N) at C:\Users\berko\.julia\packages\HTTP\TVRTz\src\ExceptionRequest.jl:22
 [2] (::getfield(HTTP, Symbol("#kw##request")))(::NamedTuple{(:iofunction, :reached_redirect_limit),Tuple{Nothing,Bool}}, ::typeof(HTTP.request), ::Type{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}, ::URIs.URI, ::HTTP.Messages.Request, ::String) 
at .\none:0
 [3] (::getfield(Base, Symbol("###44#45#46")){ExponentialBackOff,getfield(HTTP.RetryRequest, Symbol("##2#3")){Bool,HTTP.Messages.Request},typeof(HTTP.request)})(::Base.Iterators.Pairs{Symbol,Union{Nothing, Bool},Tuple{Symbol,Symbol},NamedTuple{(:iofunction, :reached_redirect_limit),Tuple{Nothing,Bool}}}, ::Function, ::Type, ::Vararg{Any,N} where N) at .\error.jl:203
 [4] #request#1(::VersionNumber, ::String, ::Nothing, ::Nothing, 
::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:reached_redirect_limit,),Tuple{Bool}}}, ::Function, ::Type{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}, ::String, ::URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String) at .\none:0 (repeats 2 times)   
 [5] (::getfield(HTTP, Symbol("#kw##request")))(::NamedTuple{(:reached_redirect_limit,),Tuple{Bool}}, ::typeof(HTTP.request), ::Type{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}, ::String, ::URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String) at .\none:0
 [6] #request#1(::Int64, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Type{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}, ::String, ::URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String) at C:\Users\berko\.julia\packages\HTTP\TVRTz\src\RedirectRequest.jl:24
 [7] request(::Type{RedirectLayer{BasicAuthLayer{MessageLayer{RetryLayer{ExceptionLayer{ConnectionPoolLayer{StreamLayer{Union{}}}}}}}}}, ::String, ::URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String) at C:\Users\berko\.julia\packages\HTTP\TVRTz\src\RedirectRequest.jl:21
 [8] #request#5(::Dict{String,String}, ::String, ::Nothing, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String, ::String, ::Array{Any,1}, ::String) at C:\Users\berko\.julia\packages\HTTP\TVRTz\src\HTTP.jl:315
 [9] #post at .\none:0 [inlined]
 [10] submit_generic(::Array{CoverageTools.FileCoverage,1}, ::Dict{Symbol,Any}) at C:\Users\berko\.julia\packages\Coverage\3V3Eo\src\codecovio.jl:228
 [11] #submit_local#4(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Array{CoverageTools.FileCoverage,1}, ::String) at C:\Users\berko\.julia\packages\Coverage\3V3Eo\src\codecovio.jl:181
 [12] submit_local at C:\Users\berko\.julia\packages\Coverage\3V3Eo\src\codecovio.jl:181 [inlined] (repeats 2 times)
 [13] top-level scope at none:0

Please help! I am using latest Coverage (1.2.0) and HTTP v0.9.3, on Julia 1.5.3.

@vtjnash
Copy link
Member

vtjnash commented Mar 22, 2021

We added the Accept header recently (#293), but it looks like their backend server might now break when you pass that option (and always gives text/json now, regardless of what is requested / Allowed)

vtjnash added a commit that referenced this issue Mar 22, 2021
vtjnash added a commit that referenced this issue Mar 22, 2021
vtjnash added a commit that referenced this issue Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants