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 · Reductech / EDR / 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 · Reductech / EDR / Core · GitLab

This is the upload for that MR, it’s still showing the ‘Waiting for CI to complete’ error: Code coverage done right.

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: Draft: Resolve "Remove stryker as a local tool" (!13) · Merge requests · Reductech / EDR / Connectors / FileSystem · GitLab

This is the codecov upload job for that MR: code coverage dev (#1533258155) · Jobs · Reductech / EDR / 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!