codecov/feedback

The base commit is incorrect and 10+ months old

Closed this issue · 18 comments

Hi,

The project https://github.com/open-telemetry/opamp-go uses this action (Workflow config https://github.com/open-telemetry/opamp-go/blob/c1931d7bacc7424e274e5bbdb47ab16829c438de/.github/workflows/build-and-test.yml#L101-L109) for coverage reporting and tracking.

Coverage report on the most recent PR merged to main open-telemetry/opamp-go#207 shows 71.58% (-4.54%) compared to open-telemetry/opamp-go@efddaa2. However, the base commit used for comparison is from last year, Nov 18th. Similarly, for the PRs which are yet to be merged, I assumed they would be compared against the main, i.e. open-telemetry/opamp-go@c1931d7 but these runs also use efddaa which is incorrect. Here is an example PR that has a wrong base commit: open-telemetry/opamp-go#192.

Is this the right place, or should I open a support request at https://community.codecov.com/?

Thank you for posting this. I noticed the same issue with my PR (same project) open-telemetry/opamp-go#209

It's impossible to make use of the information when it compares coverage to an arbitrary old commit.

Hello @rohan-at-sentry / @thomasrockhu-codecov, can we get some help here? Is this a bug or misconfiguration from the original repo side?

Thanks for raising this @srikanthccv . Was the base commit from last year, Nov 18th the last time the project uploaded coverage successfully?

@rohan-at-sentry how can I get what was the last commit that had coverage uploaded successfully? This is the output of the recent upload job on the main branch. The repo is https://github.com/open-telemetry/opamp-go. I see that some output URL contains https://app.codecov.io/github/tigrannajaryan/opamp-go. Should it be https://app.codecov.io/github/open-telemetry/opamp-go? for the context tigran is one of the maintainers of the project who set up codecov. Is there any chance that could be the reason?

Run codecov/codecov-action@v3
{
  execArgs: [
    '-n',
    '',
    '-Q',
    'github-action-3.1.4',
    '-Z',
    '-f',
    './coverage.out',
    '-v'
  ]
}
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
Received SHA256SUM b[9](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:10)282b8b43eef83f722646d8992c4dd36563046afe0806722184e7e9923a6d7b  codecov
Received SHA256SUM signature -----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEJwNOf9uFDgu8LGL/gGuyiu13mGkFAmUxirIACgkQgGuyiu13
mGn3ZRAAlJHm2/89vmOCXeIj/2pf7RzcETDdBH7MATPk12fOGHOCsuH+sUHz9mtG
/G/B7456Q+3ReEMUx0k0OpGoHkoAe4a8GqcZzCx3S9H2u2SHtBxufuLkoROGm8ZO
jkOIDEVosbL5lClmOD8YE7ALZ3gx/4uoqGK4aSWEVtAtpl35x3xY8DfY0U3qs6RL
kvr1uFGHdw9YHU7JGxE0McpffheBVl37dvoqvWbQ1Z7Ag8Hwrr+TxQE3lNIsw3Jc
Akj4Zvg7Htv5S4eVstx5Buu4ZTBenrgGmdiiViqlL7R6ohRimswFzooKt331iy8I
QNCmsNGCRPcbI4vkF[10](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:11)UWLswfpi4TrKHeWqJYQPm2IlGEftzsBnjUjq1hSMpe+D9
5LtVl0njjIXJD14D3hUa0ANHmBczUTzSX7zkjRVoTDj0vi4iHLgSks+YyfcVcOYG
bMztLntfxj3tTekSgToj5FkclW/NglCmd6Eu02pCeD24Iv1zwhsQg97XFOiERrPk
M9kp+VxeV60UGPtsrt8M+tCwRn6W8FepOUAn6VOzh37k0wa8vF3hJajJOOPOQM0i
I6N5yRHn/FUVAwCZ1bMsUqOiVHzyKz3qA6PlvsnRY66yYx1IuXx683duW8BtLpyO
PCjR9Mqicfxylc6smKS5L5VNaIqDUluGhuQTXwRMTK+Ysh4hJto=
=Sq2O
-----END PGP SIGNATURE-----

==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (b9282b8b43eef83f722646d8992c4dd36563046afe0806722184e7e9923a6d7b  codecov)
==> Running version latest
==> Running version v0.7.1
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.4 -Z -f ./coverage.out -v
[2024-01-09T22:48:09.805Z] ['verbose'] Start of uploader: 1704840489805...
[2024-01-09T22:48:09.806Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.7.1
[2024-01-09T22:48:09.812Z] ['info'] => Project root located at: /home/runner/work/opamp-go/opamp-go
[2024-01-09T22:48:09.813Z] ['info'] ->  Token found by environment variables
[2024-01-09T22:48:09.814Z] ['verbose'] Start of network processing...
[2024-01-09T22:48:09.814Z] ['verbose'] Searching for files in /home/runner/work/opamp-go/opamp-go
[2024-01-09T22:48:09.822Z] ['verbose'] coveragepy is not installed
[2024-01-09T22:48:09.822Z] ['info'] Searching for coverage files...
[2024-01-09T22:48:09.860Z] ['verbose'] Preparing to clean the following coverage paths: ./coverage.out
[2024-01-09T22:48:09.860Z] ['info'] => Found 1 possible coverage files:
  ./coverage.out
[2024-01-09T22:48:09.860Z] ['verbose'] End of network processing
[2024-01-09T22:48:09.860Z] ['info'] Processing ./coverage.out...
[2024-01-09T22:48:09.864Z] ['info'] Detected GitHub Actions as the CI provider.
[2024-01-09T22:48:09.864Z] ['verbose'] -> Using the following env variables:
[2024-01-09T22:48:09.865Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2024-01-09T22:48:09.865Z] ['verbose']      GITHUB_HEAD_REF: 
[2024-01-09T22:48:09.865Z] ['verbose']      GITHUB_REF: refs/heads/main
[2024-01-09T22:48:09.865Z] ['verbose']      GITHUB_REPOSITORY: open-telemetry/opamp-go
[2024-01-09T22:48:09.865Z] ['verbose']      GITHUB_RUN_ID: 74678[11](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:12)268
[2024-01-09T22:48:09.865Z] ['verbose']      GITHUB_SERVER_URL: https://github.com
[2024-01-09T22:48:09.865Z] ['verbose']      GITHUB_SHA: 103f86[12](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:13)119b65d3867d10d6a2d8da4f8fa30375
[2024-01-09T22:48:09.865Z] ['verbose']      GITHUB_WORKFLOW: build-and-test
[2024-01-09T22:48:10.112Z] ['verbose'] Using the following upload parameters:
[2024-01-09T22:48:10.112Z] ['verbose'] branch
[2024-01-09T22:48:10.112Z] ['verbose'] build
[2024-01-09T22:48:10.112Z] ['verbose'] buildURL
[2024-01-09T22:48:10.112Z] ['verbose'] commit
[2024-01-09T22:48:10.112Z] ['verbose'] job
[2024-01-09T22:48:10.112Z] ['verbose'] pr
[2024-01-09T22:48:10.112Z] ['verbose'] service
[2024-01-09T22:48:10.112Z] ['verbose'] slug
[2024-01-09T22:48:10.112Z] ['verbose'] name
[2024-01-09T22:48:10.112Z] ['verbose'] tag
[2024-01-09T22:48:10.1[13](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:14)Z] ['verbose'] flags
[2024-01-09T22:48:10.113Z] ['verbose'] parent
[2024-01-09T22:48:10.1[14](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:15)Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.4-uploader-0.7.1&token=*******&branch=main&build=7467811268&build_url=https%3A%2F%2Fgithub.com%2Fopen-telemetry%2Fopamp-go%2Factions%2Fruns%2F7467811268%2Fjob%2F20322043579&commit=103f8612119b65d3867d10d6a2d8da4f8fa30375&job=build-and-test&pr=&service=github-actions&slug=open-telemetry%2Fopamp-go&name=&tag=&flags=&parent=
[2024-01-09T22:48:10.114Z] ['verbose'] Passed token was 36 characters long
[2024-01-09T22:48:10.114Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.4-uploader-0.7.1&branch=main&build=7467811268&build_url=https%3A%2F%2Fgithub.com%2Fopen-telemetry%2Fopamp-go%2Factions%2Fruns%2F7467811268%2Fjob%2F20322043579&commit=103f8612119b65d3867d10d6a2d8da4f8fa30375&job=build-and-test&pr=&service=github-actions&slug=open-telemetry%2Fopamp-go&name=&tag=&flags=&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2024-01-09T22:48:10.587Z] ['info'] https://app.codecov.io/github/tigrannajaryan/opamp-go/commit/103f8612119b65d3867d10d6a2d8da4f8fa30375
https://storage.googleapis.com/codecov/v4/raw/2024-01-09/A794C61BDE2EA5CF9D2B12A0C3B1C250/103f8612119b65d3867d10d6a2d8da4f8fa30375/f798[18](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:19)a2-c10b-477f-9fd8-062077bb435b.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20240109%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20240109T224810Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=e10836986d884f4b39ade4e72bb87eaadf287a4fe9c7a6[19](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:20)53b3fb8f0c25d2b0
[[20](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:21)24-01-09T22:48:10.587Z] ['verbose'] Returned upload url: https://storage.googleapis.com/codecov/v4/raw/2024-01-09/A794C61BDE2EA5CF9D2B12A0C3B1C250/103f8612119b65d3867d10d6a2d8da4f8fa30375/f79818a2-c10b-477f-9fd8-062077bb435b.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20240109%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20240109T224810Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=e10836986d884f4b39ade4e72bb87eaadf287a4fe9c7a61953b3fb8f0c25d2b0
[2024-01-09T22:48:10.587Z] ['info'] Uploading...
[2024-01-09T22:48:10.770Z] ['info'] {"status":"processing","resultURL":"https://app.codecov.io/github/tigrannajaryan/opamp-go/commit/103f8612119b65d3867d10d6a2d8da4f8fa30375"}
[2024-01-09T[22](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:23):[48](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:49):10.771Z] ['verbose'] End of uploader: 9[66](https://github.com/open-telemetry/opamp-go/actions/runs/7467811268/job/20322043579#step:9:67) milliseconds

@srikanthccv something feels off here. If you look at the codecov UI for the project, it seems like we're last seeing successfully processed reports from commits 8 months ago

https://app.codecov.io/gh/open-telemetry/opamp-go/commits

@drazisil-codecov can you take a look here when you're in tomorrow?

Thanks @rohan-at-sentry. Seems like https://app.codecov.io/github/tigrannajaryan/opamp-go/commits has the most recent successful uploads instead of https://app.codecov.io/github/open-telemetry/opamp-go/commits. I suspect it could be because of the token used? but I will check with the project maintainers once.

@andykellr I see a similar issue with the example you linked as well

https://app.codecov.io/gh/open-telemetry/opamp-go/commits

@rohan-at-sentry we have a new commit that got uploaded to codecov under the correct account https://app.codecov.io/gh/open-telemetry/opamp-go/commits but the didn't make any difference. We would really appreciate it if you could help us figure out what's happening and change the base commit to the latest main.

When are you uploading coverage? On all commits, or only on PRs?

@drazisil-codecov On pull request and on push to main.

@drazisil-codecov On pull request and on push to main.

Can you link me the latest PR on codecov.io, please? It's looks like you are experiencing missing base commits, which would explain why Codecov reaches so far back to find a base to use.

Here is a one such PR https://app.codecov.io/gh/open-telemetry/opamp-go/pull/240 which uses the incorrect base base efddaa2

What we noticed was the commits on this https://app.codecov.io/gh/tigrannajaryan/opamp-go/commits had the correct reports uploaded but they were supposed to be here https://app.codecov.io/gh/open-telemetry/opamp-go/commits

Here is a one such PR https://app.codecov.io/gh/open-telemetry/opamp-go/pull/240 which uses the incorrect base base efddaa2

What we noticed was the commits on this https://app.codecov.io/gh/tigrannajaryan/opamp-go/commits had the correct reports uploaded but they were supposed to be here https://app.codecov.io/gh/open-telemetry/opamp-go/commits

Were you able to confirm you were using the correct upload token? Was that maybe from running the CI as a fork? How to you pass the token to the uploader?

Were you able to confirm you were using the correct upload token?

Yes, we made sure it was using the correct token

Was that maybe from running the CI as a fork?

How to verify or disprove this?

How to you pass the token to the uploader?

GitHub secrets which are provided to codecov during actions run

If it's being passed as an repo secret then a fork would not have access, I believe.

I think it may have been a case of fixing whatever was not uploading from main. https://app.codecov.io/gh/open-telemetry/opamp-go/pull/244 looks ok.

Can you let me know if your next PR does as well?

Thank you, let me check and get back.

@srikanthccv @andykellr I'm closing this issue. If it persists, please let us know