File viewer - line coverage

Hi all,
I upload my code from BB to codecov in pipelines by:

- go get -t -v ./...
- go test -race -coverprofile=coverage.txt -covermode=atomic ./pkg... ./cmd/...
- bash <(curl -s https://codecov.io/bash)

Eveything looks good but in file viewer I always see “There was a problem getting the source code from your provider. Unable to show line by line coverage.” only.

@scippio

  1. Can you fill out the template provided when opening up a topic? It helps us to debug issues and decrease back and forth trying to get information.
  2. We are deprecating the bash uploader in favor of our new uploader
  3. You may need to set a team bot if you have a private repository.

Hi Tom,
thanks for answer. I changed uploader from bash to newer And add codecov.yml with my username on BB. I’m logged to codecov and all persmissions to this user was granted.

Description

In file viewer I always see “There was a problem getting the source code from your provider. Unable to show line by line coverage.” only.

CI/CD URL

private repository on Log in with Atlassian account

Codecov Output

`[2021-11-23T16:17:32.930Z] ['info'] => Project root located at: /opt/atlassian/pipelines/agent/build`
`[2021-11-23T16:17:32.931Z] ['info'] ->  Token found by arguments`
`[2021-11-23T16:17:32.938Z] ['info'] Searching for coverage files...`
`[2021-11-23T16:17:32.971Z] ['info'] => Found 2 possible coverage files:`
`  coverage.txt`
`  coverage/lcov.info`
`[2021-11-23T16:17:32.971Z] ['info'] Processing /opt/atlassian/pipelines/agent/build/coverage.txt...`
`[2021-11-23T16:17:32.973Z] ['info'] Processing /opt/atlassian/pipelines/agent/build/coverage/lcov.info...`
`[2021-11-23T16:17:32.979Z] ['info'] Detected Bitbucket as the CI provider.`
`[2021-11-23T16:17:32.979Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.13&token=*******&branch=master&build=791&build_url=&commit=edd0e737b8062e736378d5e38592777d1c4cd716&job=791&pr=&service=bitbucket&slug=converting-traffic-splitter%2Fconverting-traffic-splitter&name=&tag=&flags=&parent=`
`[2021-11-23T16:17:33.110Z] ['info'] Uploading...`
`[2021-11-23T16:17:33.323Z] ['info'] {"status":"success","resultURL":"https://codecov.io/bitbucket/converting-traffic-splitter/converting-traffic-splitter/commit/edd0e737b8062e736378d5e38592777d1c4cd716"}`

Expected Results

File coverage view.

Actual Results

In file viewer I always see “There was a problem getting the source code from your provider. Unable to show line by line coverage.” only.

Additional Information

I updated codecov upload script + added codecov.yml with bot name (My account on BB = my bot username)

@scippio can you re-run CI with the new codecov.yml? I’m not seeing it being populated on that previous commit. We ingest the codecov.yml config at time of upload, not afterwards.

I already done it… but everything is same.

  • btw… I don’t know if it related but this link does not work:

  • I see “Unable to find commit in Bitbucket” … on some commits there:
    image

@scippio I’m not seeing the bot getting set. Can you post the codecov.yml and confirm that the file is on the same branch as your commits?

ofcourse:
it’s in the root in the same (master) branch:
image
with this content:

codecov:
  bot: scippio

I added cat command for you into pipeline:

cat ./codecov.yml
+ cat ./codecov.yml
codecov:
  bot: scippio
./codecov -t ${CODECOV_TOKEN}
+ ./codecov -t ${CODECOV_TOKEN}
[2021-11-23T19:41:27.680Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
  Codecov report uploader 0.1.13
[2021-11-23T19:41:27.689Z] ['info'] => Project root located at: /opt/atlassian/pipelines/agent/build
[2021-11-23T19:41:27.690Z] ['info'] ->  Token found by arguments
[2021-11-23T19:41:27.697Z] ['info'] Searching for coverage files...
[2021-11-23T19:41:27.728Z] ['info'] => Found 2 possible coverage files:
  coverage.txt
  coverage/lcov.info
[2021-11-23T19:41:27.729Z] ['info'] Processing /opt/atlassian/pipelines/agent/build/coverage.txt...
[2021-11-23T19:41:27.730Z] ['info'] Processing /opt/atlassian/pipelines/agent/build/coverage/lcov.info...
[2021-11-23T19:41:27.736Z] ['info'] Detected Bitbucket as the CI provider.
[2021-11-23T19:41:27.737Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.13&token=*******&branch=master&build=793&build_url=&commit=44bd7e28231111e925cb935d81c9c0c883aa9353&job=793&pr=&service=bitbucket&slug=converting-traffic-splitter%2Fconverting-traffic-splitter&name=&tag=&flags=&parent=

@scippio ok, we made a small fix that should get us back on track. Can you push a new commit and see if you still cannot view the files?

@tom sorry, but everything is still same after commit… (maybe RECENT COMMITS list looks ok now…)