Since 2 weeks - "Unable to find commit in Gitlab"

As seen here, codecov almost never detect the commits, leading to a broken badge.

The YAML for the project

coverage:
  precision: 2
  round: down
  range: "70...98"
fixes:
  - "temp/::"

However the percentage seems to be updated correctly so this would be only a minor problem.
The page for the last commit suggests with

Waiting for CI to complete. Please review report with caution, it may change. Click here to learn more .

that this could be caused because CI completion is not reported correctly.

1 Like

Same issue here with all our public and private repos. Hereā€™s an example:

Seems to happen with both the bash script and the new beta upload script.

@TungstenHeart and @antonyoni, have you added a team bot?

Iā€™ve just tried adding a team bot, still no joy.

It did used to work fine for public repos without the team bot - Resolve "Prepare for release v0.9.0" (!3) Ā· Merge requests Ā· Sequence / Connectors / FileSystem Ā· GitLab

It was using the global gitlab codecov account to post previously - Codecov Ā· GitLab

Looking at that account, the last activity was June 5th, which is about the time that all our reports stopped working too :smiley:

Hi @antonyoni thanks for your patience here. We made some changes on our backend, are you still seeing an issue?

I have the same issue but Iā€™m not sure if Iā€™m doing something wrong. Most of the commits show the above error message: Codecov

CI logs seem fine to me: pytest: [python:3.9] (#1435735865) Ā· Jobs Ā· Shahriar Heidrich / mpdispatcher Ā· GitLab

@smheidrich, if you go to GitLab applications, are you able to see what scope Codecov has at the bottom? If it does not have read api, can you revoke the token, log out of Codecov and try signing back in?

hi @tom - yes, issue still persists. No codecov summaries in our merge requests, even though the uploads are successful. Hereā€™s a recent MR: Resolve "Create Helper methods to evaluate step parameters to reduce boiler plate code" (!275) Ā· Merge requests Ā· Sequence / Core Ā· GitLab

This is the upload for that MR, itā€™s still showing the ā€˜Waiting for CI to completeā€™ error: https://codecov.io/gitlab/reductech:edr/core/commit/dae9564c1b4ba404bf999184d8b73993dc9aa0b9

Iā€™m just having a look at our project settings - and it doesnā€™t look like the global yaml is propagating to the individual projects - I have the bot set in the yaml for the group reductech:edr but current bot is showing up as Current Bot: None for all the projects in that group. Do i have to specify the bot individually for each project, it canā€™t be done at group level?

It had api permissions which I guess includes read_api. I tried revoking, logging out and logging in again anyway; the new authorization has api permissions as well so I guess thatā€™s all fine.

no change with the team bot.

Hi @tom,
I can confirm the issue is that the global YAML does not propagate to any of the repositories. Iā€™ve added the bot config to codecov.yml in one of our repos, and that project is now getting the reports in the merge requests.
This is a workaround for now, but itā€™d be great not to have to set up the same yaml across all our projects.
Thanks, Antony

@antonyoni apologies I lost track of this. Do you have a recent commit where this is not happening? Iā€™ll take a look and see why global YAML is not working.

Hi @tom

It turns out that itā€™s only our private repos that work with a codecov.yml. Iā€™ve added a codecov.yml to one of our public repos, but still get a Current Bot: None in the settings:

Hereā€™s a recent MR, the codecov upload is successful, but the commit is showing up as ā€˜Unable to find commit in GitLabā€™ and no report is available in the MR: Resolve "Remove stryker as a local tool" (!13) Ā· Merge requests Ā· Sequence / Connectors / FileSystem Ā· GitLab

This is the codecov upload job for that MR: code coverage dev (#1533258155) Ā· Jobs Ā· Sequence / Connectors / FileSystem Ā· GitLab

If I click on the resultURL I get a Forbidden error, it asks me to log in even though I already am.

The reductech:edr:connectors group in codecov also has a global yaml with the bot: Codecov

This is the private repo that works with the codecov.yml: Codecov

Thanks, Antony

Hello, Iā€™ve found something strange today.

To those who are still struggling with the issue,
On Codecov website, check the Settings tab, panel Default Branch Name.

The field for me contained the text b'master'.
After changing it to master, the charts and the graph have reapeared auto-magically. :sweat_smile:

b'master' looks like a git command, So maybe a kind of data corruption has occured at some point (end of June) ? Maybe something related to a bogus command line parsing ?

Hi @TungstenHeart, glad you got this one sorted.

I had a look and all our repos have the correct main/master branch set in codecov, without any additional characters or quotes. We donā€™t have any issues with viewing the charts in codecov, but all our commits are still showing up as ā€œUnable to find commit in Gitlabā€ and codecov is not updating any of our Merge Requests with a summary in GitLab.

Are you now seeing the codecov summaries in Merge Requests on GitLab?

Hello, to be clear, I still see the ā€œUnable to find commit in Gitlabā€ messages but my main concern was that the graphs were not visible anymore.

About the summary, no Iā€™ve never seen one. Maybe you mention that because I had reply to Since 2 weeks - "Unable to find commit in Gitlab" - #16 by antonyoni. This was a simple mistake, e.g ā€œoops wrong topicā€.

@antonyoni @TungstenHeart we made some changes on our side, can you see if you are getting this issue on new merge requests?

1 Like

Looks good to me, the list of commit does not show ā€œUnable to find commit in Gitlabā€ anymore.

1 Like

Hi @tom - itā€™s looking good on our side too. Weā€™re getting summaries posted to MRs and no more ā€˜Unable to find commitā€™ errors in codecov. Thank you!