Skip to content
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

[codecov] coverage not reported correctly on main #1473

Closed
pichlermarc opened this issue Apr 24, 2023 · 2 comments · Fixed by #1605
Closed

[codecov] coverage not reported correctly on main #1473

pichlermarc opened this issue Apr 24, 2023 · 2 comments · Fixed by #1605
Labels
bug Something isn't working internal never-stale priority:p4 Bugs and spec inconsistencies which do not fall into a higher prioritization

Comments

@pichlermarc
Copy link
Member

What version of OpenTelemetry are you using?

codecov is not reporting coverage correctly on main and most PRs. It's only detecting 906 lines, and looks like it's only using the browser test reports, whereas some PRs detect more lines (4706), including the node test reports as well, which is the intended amount.

What did you do?

Created a PR (#1468), had the pipeline run there - the codecov step failed with many indirect coverage changes.

What did you expect to see?

codecov detecting all lines in the report on main, not only the ones hit in browser tests.

What did you see instead?

codecov reports only include files used in browser tests on main.

Additional context

renovate/otel-core-experimental branch's coverage report (detecting 4706 lines and including detectors)
image

main branch's coverage report (detecting only 906 lines)
image

@pichlermarc pichlermarc added bug Something isn't working internal labels Apr 24, 2023
@pichlermarc pichlermarc added the priority:p4 Bugs and spec inconsistencies which do not fall into a higher prioritization label May 10, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@chigia001
Copy link
Contributor

@pichlermarc @blumamir I double check 2 latest commit on main and seem like there are still some issue as codecov randomly unable to upload our code coverage file.

[2023-08-10T13:39:53.315Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.4-uploader-0.6.2&branch=main&build=5821384904&build_url=https%3A%2F%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-js-contrib%2Factions%2Fruns%2F5821384904&commit=4f1124524aee565c3cfbf3975aa5d3d039377621&job=Unit+Tests&pr=&service=github-actions&slug=open-telemetry%2Fopentelemetry-js-contrib&name=&tag=&flags=&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2023-08-10T13:39:53.529Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}

This can be fix by adding token key to codecov-action, due to some quota limiting on Github side. But this will require change to repo's settings + admin access to codecov's dashboard to get the token.

- uses: codecov/codecov-action@v3
  with:
    token: ${{ secrets.CODECOV_TOKEN }}

This comment from codecov-action's repo list out the pro/cons of expose this token value as public variable vs secret:
codecov/codecov-action#557 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internal never-stale priority:p4 Bugs and spec inconsistencies which do not fall into a higher prioritization
Projects
None yet
2 participants