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

🧪🚑 Pass a Codecov config to the action @ GHA #12508

Merged

Conversation

webknjaz
Copy link
Member

@webknjaz webknjaz commented Jun 21, 2024

The #11921 update broke uploading coverage of the main branch (or any in-repo pushes for that matter) to Codecov 4 months ago. Version 4 requires an upload token to be provided and since there was no configuration for it, the upload was failing. But the step itself was showing up as successful due to fail_ci_if_error: true being set. The error is visible in the console output, though.

This patch flips the setting to fail_ci_if_error: false and sets the Codecov upload token in the config in clear text. The non-secret part allows the PRs uploads to be more stable.

@webknjaz webknjaz marked this pull request as ready for review June 21, 2024 13:38
@webknjaz
Copy link
Member Author

@RonnyPfannschmidt this probably doesn't need a change note and should be backported.

@RonnyPfannschmidt RonnyPfannschmidt added backport 8.2.x skip news used on prs to opt out of the changelog requirement labels Jun 21, 2024
The pytest-dev#11921 update broke uploading coverage of the `main` branch (or
any in-repo pushes for that matter) to Codecov 4 months ago.
Version 4 requires an upload token to be provided and since there was
no configuration for it, the upload was failing. But the step itself
was showing up as successful due to `fail_ci_if_error: true` being
set. The error is visible in the console output, though.

This patch flips the setting to `fail_ci_if_error: false` and sets the
Codecov upload token in the config in clear text. The non-secret part
allows the PRs uploads to be more stable.

Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
@webknjaz webknjaz force-pushed the maintenance/gha-codecov-token branch from e0f70a4 to 774d71a Compare June 21, 2024 14:55
@webknjaz
Copy link
Member Author

@RonnyPfannschmidt this is auto-merge-ready now.

@webknjaz
Copy link
Member Author

UPD: it looks like the codecov action isn't picking up the config. Perhaps, it needs renaming.

@webknjaz
Copy link
Member Author

Let's try merging. Perhaps, it'll work once the config is in main..

@The-Compiler
Copy link
Member

Not that comfortable with the token being public, but while Adding the Codecov token doesn't explicitly mention it, the web interface shows that as a possible option:

image

so I suppose we'll be fine.

@The-Compiler The-Compiler merged commit 9947ec3 into pytest-dev:main Jun 21, 2024
28 checks passed
Copy link

patchback bot commented Jun 21, 2024

Backport to 8.2.x: 💚 backport PR created

✅ Backport PR branch: patchback/backports/8.2.x/9947ec3ad1a0fb9f85b092a50b0866b3870e37ad/pr-12508

Backported as #12513

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jun 21, 2024
The #11921 update broke uploading coverage of the `main` branch (or
any in-repo pushes for that matter) to Codecov 4 months ago.
Version 4 requires an upload token to be provided and since there was
no configuration for it, the upload was failing. But the step itself
was showing up as successful due to `fail_ci_if_error: true` being
set. The error is visible in the console output, though.

This patch flips the setting to `fail_ci_if_error: false` and sets the
Codecov upload token in the config in clear text. The non-secret part
allows the PRs uploads to be more stable.

Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
(cherry picked from commit 9947ec3)
The-Compiler pushed a commit that referenced this pull request Jun 21, 2024
The #11921 update broke uploading coverage of the `main` branch (or
any in-repo pushes for that matter) to Codecov 4 months ago.
Version 4 requires an upload token to be provided and since there was
no configuration for it, the upload was failing. But the step itself
was showing up as successful due to `fail_ci_if_error: true` being
set. The error is visible in the console output, though.

This patch flips the setting to `fail_ci_if_error: false` and sets the
Codecov upload token in the config in clear text. The non-secret part
allows the PRs uploads to be more stable.

Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
(cherry picked from commit 9947ec3)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>
webknjaz added a commit to webknjaz/pytest that referenced this pull request Jun 21, 2024
It's necessary since it seems that the currently used Codecov uploader
doesn't read the token from config sometimes.

This is a follow-up for pytest-dev#12508 which wasn't enough.
@webknjaz webknjaz added the type: infrastructure improvement to development/releases/CI structure label Jun 26, 2024
Glyphack pushed a commit to Glyphack/pytest that referenced this pull request Jul 30, 2024
The pytest-dev#11921 update broke uploading coverage of the `main` branch (or
any in-repo pushes for that matter) to Codecov 4 months ago.
Version 4 requires an upload token to be provided and since there was
no configuration for it, the upload was failing. But the step itself
was showing up as successful due to `fail_ci_if_error: true` being
set. The error is visible in the console output, though.

This patch flips the setting to `fail_ci_if_error: false` and sets the
Codecov upload token in the config in clear text. The non-secret part
allows the PRs uploads to be more stable.

Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
Glyphack pushed a commit to Glyphack/pytest that referenced this pull request Jul 30, 2024
It's necessary since it seems that the currently used Codecov uploader
doesn't read the token from config sometimes.

This is a follow-up for pytest-dev#12508 which wasn't enough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news used on prs to opt out of the changelog requirement type: infrastructure improvement to development/releases/CI structure
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants