Skip to content

Codecov is not showing the latest commits on main. #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
samcunliffe opened this issue Jun 7, 2023 · 2 comments · Fixed by #170
Closed

Codecov is not showing the latest commits on main. #155

samcunliffe opened this issue Jun 7, 2023 · 2 comments · Fixed by #170
Assignees
Labels
Bug Something isn't working Tests Upstream issue Needs a fix in one of the napari-matplotlib dependencies

Comments

@samcunliffe
Copy link
Collaborator

samcunliffe commented Jun 7, 2023

Relatively minor, and I think it's something to do with the merge queue's autobranches.

The codecov landing page for this project should show the coverage at the "latest" commit on main. Which it claims is 9598eeb

However, that was the middle of last week. There don't seem to be any relevant changes after or around this commit in our history (the next PR to be merged into main was #146 which doesn't touch the coverage or the ci).

Note that all commits' builds on main actually have sent coverage reports to codecov. They are coming from the merge queue's auto-generated branches and when the build reruns on main, it seems somehow that the gh-readonly-queue/ branch is given precedence.

Not sure if this can be fixed with a setting in codecov. Possibly we could skip coverage upload by hacking our CI yml with something like:

- name: Upload coverage report (skip if this is a merge queue build)
  if: ${{ !contains(github.ref, 'gh-readonly-queue/') }}
  uses: codecov/codecov-action@v2

For the coverage step. Assuming that it reruns the build as on main.


Unsure if related, but (since I'm digging in the codecov uploads) we have encountered codecov/3954 a few times. They recommend using a codecov upload token even if the repo is public.

@samcunliffe samcunliffe added Bug Something isn't working Tests Upstream issue Needs a fix in one of the napari-matplotlib dependencies labels Jun 7, 2023
@samcunliffe
Copy link
Collaborator Author

(@ruaridhg we spoke about this IRL yesterday)

This was referenced Jun 12, 2023
@dstansby
Copy link
Member

I think what's happening is:

  • CI runs on both the main branch and merge queue branch for the same commit
  • Depending on which one finishes first, codecov attributes the coverage from that commit to one or the other branches (I'm not sure whether it's the first or last CI run to finish)
  • If it's attributed to the merge queue branch, it's not attributed to the main branch

So it seems like one solution is to stop the merge queue CI uploading coverage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Tests Upstream issue Needs a fix in one of the napari-matplotlib dependencies
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants