I have three open source project repos on Gitlab. Each of them are configured to upload to Codecov as part of their CI. None of them seem to… completely… work with it though. But also, none of them are “broken” in quite the same way. I have detailed the issues below.
Note that I recently moved these from public projects under my personal account to public projects under a group. This was to qualify for Gitlab’s open source CI benefits. The issues I describe were the same before the move though.
I’ll break it down for each repo:
Repo 1 (Rust Test Binary)
- Project: Rust Test Binary
- Example MR: Retain compiler messages and display on error
- Successful CI job with Codecov upload
Output from Codecov run:
$ ./codecov -R $CI_PROJECT_DIR
[2023-01-22T17:55:06.375Z] ['info']
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Codecov report uploader 0.3.2
[2023-01-22T17:55:06.378Z] ['info'] => Project root located at: /builds/rust-test-binary/test-binary
[2023-01-22T17:55:06.379Z] ['info'] -> Token found by environment variables
[2023-01-22T17:55:06.409Z] ['info'] Searching for coverage files...
[2023-01-22T17:55:06.565Z] ['info'] Warning: Some files located via search were excluded from upload.
[2023-01-22T17:55:06.565Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2023-01-22T17:55:06.566Z] ['info'] => Found 1 possible coverage files:
cobertura.xml
[2023-01-22T17:55:06.566Z] ['info'] Processing /builds/rust-test-binary/test-binary/cobertura.xml...
[2023-01-22T17:55:06.594Z] ['info'] Detected GitLab CI as the CI provider.
[2023-01-22T17:55:06.598Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.3.2&token=*******&branch=show-compiler-errors-on-output&build=3641644845&build_url=&commit=08bb923eb99d30b89845f4d7a4562bfc0959c425&job=&pr=&service=gitlab&slug=rust-test-binary%2Ftest-binary&name=&tag=&flags=&parent=
[2023-01-22T17:55:06.853Z] ['info'] https://app.codecov.io/gitlab/rust-test-binary/test-binary/commit/08bb923eb99d30b89845f4d7a4562bfc0959c425
https://storage.googleapis.com/codecov/v4/raw/2023-01-22/C75E7D4D5CDCF8CF6F5EFE2210F07108/08bb923eb99d30b89845f4d7a4562bfc0959c425/244c0fc5-7fd9-4530-a238-0ac4ca2ceeb4.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20230122%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20230122T175506Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=f9c71845c5788b32be6affcf77edc73847010a9ba3e95c176e597eadff6738a7
[2023-01-22T17:55:06.854Z] ['info'] Uploading...
[2023-01-22T17:55:07.048Z] ['info'] {"status":"success","resultURL":"https://app.codecov.io/gitlab/rust-test-binary/test-binary/commit/08bb923eb99d30b89845f4d7a4562bfc0959c425"}
Seems to be successful, so I assume this means I have the token correctly entered in my CI settings. I’ve confirmed it matches the one from the repo settings.
Issues:
-
Despite the upload appearing to complete successfully from this MR, the MR does not appear in the list. (Cannot post screenshot due to forum policy.)
-
I can browse to the branch on the commits page but all commits are listed as “commit message unavailable”. (Cannot post screenshot due to forum policy.)
-
There are no coverage statistics messages on the MR from Codecov. As far as I can tell, this is what is documented as the “Team Bot” feature? But the instructions say I need to create a new user on Gitlab for it, which I can’t do, because I can’t create multiple Gitlab accounts with the same email.
Repo 2 (Calloop ZeroMQ)
- Project: Calloop ZeroMQ
- Example MR: Add tests
- Successful CI job with Codecov upload
Output from Codecov run:
$ ./codecov -R $CI_PROJECT_DIR
[2023-02-13T05:32:46.777Z] ['info']
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Codecov report uploader 0.3.2
[2023-02-13T05:32:46.779Z] ['info'] => Project root located at: /builds/calloop-zmq/calloop-zmq
[2023-02-13T05:32:46.780Z] ['info'] -> Token found by environment variables
[2023-02-13T05:32:46.825Z] ['info'] Searching for coverage files...
[2023-02-13T05:32:47.047Z] ['info'] Warning: Some files located via search were excluded from upload.
[2023-02-13T05:32:47.051Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2023-02-13T05:32:47.052Z] ['info'] => Found 1 possible coverage files:
cobertura.xml
[2023-02-13T05:32:47.052Z] ['info'] Processing /builds/calloop-zmq/calloop-zmq/cobertura.xml...
[2023-02-13T05:32:47.062Z] ['info'] Detected GitLab CI as the CI provider.
[2023-02-13T05:32:47.067Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.3.2&token=*******&branch=add-tests&build=3758356074&build_url=&commit=a768193d557a0c8c4c7fd0e0b2482afe70337e2b&job=&pr=&service=gitlab&slug=calloop-zmq%2Fcalloop-zmq&name=&tag=&flags=&parent=
[2023-02-13T05:32:47.300Z] ['info'] https://app.codecov.io/gitlab/calloop-zmq/calloop-zmq/commit/a768193d557a0c8c4c7fd0e0b2482afe70337e2b
https://storage.googleapis.com/codecov/v4/raw/2023-02-13/B02131A76A1D7B519BFF3BB173E00306/a768193d557a0c8c4c7fd0e0b2482afe70337e2b/a3f1034a-2bfd-497f-914b-438b7b66f024.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20230213%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20230213T053247Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=1175b6daf218d4bbb7eff2dbd05af7a9954f7512cacbeae5f41d1e947438f25e
[2023-02-13T05:32:47.301Z] ['info'] Uploading...
[2023-02-13T05:32:47.494Z] ['info'] {"status":"success","resultURL":"https://app.codecov.io/gitlab/calloop-zmq/calloop-zmq/commit/a768193d557a0c8c4c7fd0e0b2482afe70337e2b"}
The MR does appear in the list! But:
-
The commit message is also unavailable on the commits page. (Cannot post screenshot due to forum policy.)
-
There does appear to be a “Team Bot” message on this MR… from 6 months ago…? The MR was up 6 months ago, and I did see the message then, but my point is there’s nothing since, nor on any other project. I also didn’t have to do anything to get this to happen (eg. no adding a user to the projects on
codecov.io
). Clicking on the username takes me to this profile page. The account shown there seems to have performed no activity for months.
Repo 3 (Calloop Subprocess)
- Project: Calloop Subprocess
- Example MR: Incremented version to 1.0.0 (now merged)
- Successful CI job with Codecov upload
I won’t dump the details of this one like with the other two, but basically: this one has commits properly listed on codecov.io
, but no Team Bot message on the MRs.
I realise this is a massive dump of symptoms pulled from different places, but they all relate to the same single thing — I cannot figure out how to get Codecov to work on Gitlab projects, the documentation is lacking some details, and there seems to be a non-operational(?) Codecov bot account on Gitlab that isn’t doing anything but… maybe should be?
What do I need to do to fully use Codecov on these projects? Do you need any more information about these issues?