codecov / codecov-exe

.exe report uploader for Codecov https://codecov.io
MIT License
25 stars 21 forks source link

can not upload via travis, Client Error 400 #104

Closed bitranox closed 4 years ago

bitranox commented 4 years ago
      _____          _
     / ____|        | |
    | |     ___   __| | ___  ___ _____   __
    | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
    | |___| (_) | (_| |  __/ (_| (_) \ V /
     \_____\___/ \____|\___|\___\___/ \_/
                                    v2.0.22
==> Detecting CI provider
    Travis Detected
==> Preparing upload
==> Processing gcov (disable by -X gcov)
    Executing gcov (['find', '/home/travis/build/bitranox/lib_programname', "-not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**'", '-type', 'f', '-name', '*.gcno', '', '-exec', 'gcov', '-pb', '', '{}', '+'])
find: unknown predicate `-not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**''
    Error running `['find', '/home/travis/build/bitranox/lib_programname', "-not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**'", '-type', 'f', '-name', '*.gcno', '', '-exec', 'gcov', '-pb', '', '{}', '+']`: Command '['find', '/home/travis/build/bitranox/lib_programname', "-not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**'", '-type', 'f', '-name', '*.gcno', '', '-exec', 'gcov', '-pb', '', '{}', '+']' returned non-zero exit status 1.
==> Collecting reports
    Generating coverage xml reports for Python
    + /home/travis/build/bitranox/lib_programname/coverage.xml bytes=5093
==> Appending environment variables
    + TRAVIS_OS_NAME
    + TRAVIS_PYTHON_VERSION
==> Uploading
    .url https://codecov.io
    .query commit=aef7044133d69d1e31476ff5f7bdfca078b0ee8d&branch=master&job=688009670&pr=false&service=travis&build=29.3&slug=bitranox%2Flib_programname&package=py2.0.22
    Pinging Codecov...
    Uploading to S3...
Error: 400 Client Error: Bad Request for url: https://storage.googleapis.com/codecov/v4/raw/2020-05-17/6FCEA983E832F40CEEBF26556F35B890/aef7044133d69d1e31476ff5f7bdfca078b0ee8d/2858a4a4-1a2d-4e23-98e0-229b2dfd6f96.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20200517%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20200517T104125Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=9a43bf2beca931a6e204941a97be43034d7339e65fdaf2f4030e29493df0af90
hootener commented 4 years ago

:wave: You're getting this error because Codecov recently did some fundamental storage changes on its backend in an effort to greatly improve the reliability of our underlying storage systems. I don't know enough about this repository to make changes to it and feel confident that they will work, but this issue is here:

protected virtual void ConfigureRequest(HttpRequestMessage request)
            => request.Headers.TryAddWithoutValidation("x-amz-acl", "public-read");

the X-Amz-Acl: public-read header is no longer needed. You can see a similar fix in codecov-python that removes that header here: https://github.com/codecov/codecov-python/pull/253/files

I'm not sure who the maintainer of this library is that can most confidently make this change, but I'll mention @AdmiringWorm here, in the hopes that he might.

bitranox commented 4 years ago

thanks, its working again.

AdmiringWorm commented 4 years ago

@bitranox looking at the output that you provided, it seems that you are not using the program located in this repository.

It looks like you are using the python codecov executable which is maintained here: https://github.com/codecov/codecov-python

While this repository maintains the .NET/.NET Core edition of a codecov uploader.

I am glad it worked out for you though, just wanted to point that out for future references.

arahant commented 3 years ago

Hi, I'm facing the same issue, only I'm not using the header at all

       ____          _
     / ____|        | |
    | |     ___   __| | ___  ___ _____   __
    | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
    | |___| (_) | (_| |  __/ (_| (_) \ V /
     \_____\___/ \____|\___|\___\___/ \_/
                                    v2.0.15
==> Detecting CI provider
    Travis Detected
    Fixing merge commit SHA
==> Preparing upload
==> Processing gcov (disable by -X gcov)
    Executing gcov (find /home/travis/build/devops-fall-20-inventory/inventories -not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**' -type f -name '*.gcno'  -exec gcov -pb  {} +)
==> Collecting reports
    + /home/travis/build/devops-fall-20-inventory/inventories/coverage.xml bytes=11677
==> Appending environment variables
    + TRAVIS_OS_NAME
    + TRAVIS_PYTHON_VERSION
==> Uploading
    .url https://codecov.io
    .query commit=83c7548abdbfea535bf45ca733f4a2023634a590&branch=master&job=738789457&pr=81&service=travis&build=39.1&slug=devops-fall-20-inventory%2Finventories&package=py2.0.15
    Pinging Codecov...
    Uploading to S3...
Error: 400 Client Error: Bad Request for url: https://storage.googleapis.com/codecov/v4/raw/2020-10-25/D714742CA99614AD1D17BD9D5C276583/83c7548abdbfea535bf45ca733f4a2023634a590/5f18b212-ffa7-466a-a994-29ab4ed3bc28.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20201025%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20201025T200851Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=cf66c4d71a883c196c590d7afccb5bcc5adb3d2cba8c0a9f91462f3dd9c4180c
tyki6 commented 3 years ago

hi @arahant , i have the problem than you. For fix it upgrade codecov version:

pip install codecov==2.1.11
codecov
      _____          _
     / ____|        | |
    | |     ___   __| | ___  ___ _____   __
    | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
    | |___| (_) | (_| |  __/ (_| (_) \ V /
     \_____\___/ \____|\___|\___\___/ \_/
                                    v2.1.11

==> Detecting CI provider
    Circle CI Detected
==> Preparing upload
==> Processing gcov (disable by -X gcov)
==> Collecting reports
    + /root/project/coverage.xml bytes=33551
    + /root/project/img/docstr_coverage_badge.svg bytes=1086
==> Uploading
    .url https://codecov.io
    .query commit=2a82ca593c5c557b7ace2475a3ec78e86366a613&branch=master&job=391.0&service=circleci&build=391.0&slug=*********%2FMyJWT&yaml=.codecov.yml&package=py2.1.11
    Gzipping contents..
    Compressed contents to 3407 bytes
    Pinging Codecov...
    Uploading to S3...
    Uploading to S3 took 0:00:00.179702
    https://codecov.io/github/*********/MyJWT/commit/2a82ca593c5c557b7ace2475a3ec78e86366a613
thomasrockhu commented 3 years ago

@arahant @mBouamama, I think these are codecov-python issues, if so, please use the bash uploader and see if you are still experiencing an issue.