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

REQUEST: Organization maintenance in codecov #2440

Closed
pellared opened this issue Nov 14, 2024 · 4 comments
Closed

REQUEST: Organization maintenance in codecov #2440

pellared opened this issue Nov 14, 2024 · 4 comments
Assignees
Labels
area/repo-maintenance Maintenance of repos in the open-telemetry org

Comments

@pellared
Copy link
Member

pellared commented Nov 14, 2024

Affected Repository

All repositories in the organization.

Requested changes

Please set the authentication option to "Not required".
It is designed for public open-source repositories.
Hyperlink: https://app.codecov.io/account/gh/open-telemetry/org-upload-token

Purpose

Codecov changed its token policy
From https://app.codecov.io/account/gh/open-telemetry:

You must now upload using a token. Upload with either or the repo upload token. Contact your admins to manage the upload token settings.

This change is now needed if we want to use the new v5 of codecov-action. See: codecov/codecov-action#1645

Blocks OTel Go PR: open-telemetry/opentelemetry-go#5979

PS. It still may not work because of "the upload is for a commit that is on an unprotected branch" condition from https://docs.codecov.com/docs/codecov-tokens#uploading-without-a-token (but the docs may be outdated or not accurate). I suggest not closing the issue until I confirm that everything is working fine.

Expected Duration

permanently

Repository Maintainers

  • @open-telemetry/go-maintainers
@trask
Copy link
Member

trask commented Nov 14, 2024

Please set the authentication option to "Not required".
It is designed for public open-source repositories.
Hyperlink: https://app.codecov.io/account/gh/open-telemetry/org-upload-token

I made this change.

It looks like we have a CODECOV_TOKEN org secret, but wondering what it was used for (I don't think PRs can access any secrets, so doesn't seem like it would have been useful for codecov reports, at least on PRs).

Leaving this issue open for a bit to give others a chance to comment or raise any concerns.

@pellared
Copy link
Member Author

I don't think PRs can access any secrets, so doesn't seem like it would have been useful for codecov reports, at least on PRs.

It is not working for forks, but it works when the branch is in upstream. For v4 the action was working fine so far on forks in a "tokenless" mode. I suggest keeping the CODECOV_TOKEN org secret at least until everyone migrates to v5.

@pellared
Copy link
Member Author

pellared commented Nov 14, 2024

I made this change.

Thanks! open-telemetry/opentelemetry-go#5979 passed.

Leaving this issue open for a bit to give others a chance to comment or raise any concerns.

When we merge the PR, I will also leave a comment if there is no issue when the action runs on main.

pellared added a commit to open-telemetry/opentelemetry-go that referenced this issue Nov 15, 2024
This change makes sure that an unsuccessful upload will fail the workflow as
this does not happen at the moment. See:
https://github.com/open-telemetry/opentelemetry-go/actions/runs/11845773487/job/33011997881?pr=5978#step:3:175

Additionally, it configures the codecov action to be tokenless.

Related issue (most likely solved):
- open-telemetry/community#2440


From
https://github.com/codecov/codecov-action?tab=readme-ov-file#migration-guide:

> The v5 release also coincides with the opt-out feature for tokens for
public repositories. In the repository settings page in codecov.io, you
can set the ability for Codecov to receive a coverage report from ANY
souce. This will allow contributors or other members of a repository to
upload without needing access to the Codecov token.

More codecov/codecov-action#1645

v4 was still working. See:
https://github.com/open-telemetry/opentelemetry-go/actions/runs/11842872629/job/33002565858#step:3:11
We might also consider reverting to v4 of the codecov action and just
setting `fail_ci_if_error: true`.
@pellared
Copy link
Member Author

CI passed on main: https://github.com/open-telemetry/opentelemetry-go/actions/runs/11853793435/job/33034653950#step:3:172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/repo-maintenance Maintenance of repos in the open-telemetry org
Projects
Status: Done
Development

No branches or pull requests

2 participants