HTTP 400 uploading report to codecov

Hi,

We’re getting an HTTP 400 error when uploading a Next.js coverage report to codecov from CircleCI, seemingly because the commit has checkout appended to the SHA (945c9affae708807d5cd7c8ed358b63a25543f16checkout) (see below). I’ve upgraded to 3.8.1 and this still seems to happen. From what I can tell, this seems to be a bug with the git sha detection on CircleCI as this works when I locally run the command.

Thank you!

#!/bin/bash
npx codecov -t <MY_TOKEN> -F nextjs -f clients/next/coverage/lcov.info
  _____          _  
 / ____|        | |  
| |     ___   __| | ___  ___ _____   __  
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /  
| |___| (_) | (_| |  __/ (_| (_) \ V /  
 \_____\___/ \__,_|\___|\___\___/ \_/  
                                v3.8.1
==> Detecting CI Provider
    Circle CI Detected
==> Configuration: 
    Endpoint: https://codecov.io
{ commit: '945c9affae708807d5cd7c8ed358b63a25543f16checkout',
  branch: '<MY_BRANCH>',
  package: 'node-v3.8.1' }
==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
    $ find /home/circleci/spoke -type f -name '*.gcno'  -exec gcov  {} +
    Failed to run gcov command.
==> Targeting specific file
    + /home/circleci/spoke/clients/next/coverage/lcov.info
==> Uploading reports
    HTTP 400
commit must match pattern ^\d+:\w{12}|\w{40}$

@willpots, is this on a public repo? If so, can you supply a CircleCI link?

Unfortunately it’s not on a public repo– can I provide any other context?

@willpots, hm… what happens if you run the bash uploader instead?

bash <(curl -s https://codecov.io/bash) -t <TOKEN> -F nextjs -f clients/next/coverage/lcov.info