scippio
November 23, 2021, 2:04pm
1
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
November 23, 2021, 4:30pm
3
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 https://bitbucket.org/converting-traffic-splitter/converting-traffic-splitter
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)
tom
November 23, 2021, 6:35pm
4
@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.
scippio
November 23, 2021, 7:19pm
5
I already done it… but everything is same.
tom
November 23, 2021, 7:36pm
6
@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?
scippio
November 23, 2021, 7:42pm
7
ofcourse:
it’s in the root in the same (master) branch:
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=
tom
November 30, 2021, 6:43am
8
@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?
scippio
November 30, 2021, 6:22pm
9
@tom sorry, but everything is still same after commit… (maybe RECENT COMMITS list looks ok now…)
tom
December 30, 2021, 3:08pm
10
@scippio sorry for the delay here. This ended being a deeper bug than we anticipated. We deployed a fix, do you see a difference now?
scippio
December 31, 2021, 4:05pm
11
It works! (even without new push/commit) Thank you (and happy new year )
1 Like