Skip to content

[skip changelog] Don't require Codecov upload success for test run in fork #1397

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

Merged
merged 2 commits into from
Aug 13, 2021
Merged

[skip changelog] Don't require Codecov upload success for test run in fork #1397

merged 2 commits into from
Aug 13, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 13, 2021

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce?

Bug fix

  • What is the current behavior?

The "Test Go" workflow uploads code coverage data to Codecov. There will occasionally be spurious upload failures caused
by transient network outages. These will typically succeed after the workflow is re-run, but the option to re-run is not
offered when the workflow run passes.

Because it's important that the data be complete, the codecov/codecov-action action is configured to fail the workflow
run if the upload does not succeed. However, the upload will never be able to succeed for workflow runs in a fork where
the owner has not set up Codecov.

This can cause confusion to contributors who have enabled GitHub Actions in their fork of arduino/arduino-cli to get feedback on their development work in preparation for submitting a PR, but who have not set up their Codecov account.

What is the new behavior?

The fail_ci_if_error input setting is made conditional upon the
repository name.

The result is:

  • Coverage data upload success is required for all workflow runs in the arduino/arduino-cli repository.
  • Uploads are attempted for workflow runs in forks (because the fork owner might have Codecov set up and want the data),
    but they are not required to succeed and will fail silently.

**Does this PR introduce a breaking change, and is

titled accordingly?**

Not breaking

Use of the major version ref will cause the workflow to benefit from ongoing development to the actions up until such
time as a new major release of an action is made, at which time we would need to evaluate whether any changes to the
workflow are required by the breaking change that triggered the major release before updating the major ref
(e.g., `uses: codecov/codecov-action@v3`).

The previous pin to the patch version required an update to the workflow on every action release in order to keep it
updated.
… fork

The "Test Go" workflow uploads code coverage data to Codecov. There will occasionally be spurious upload failures caused
by transient network outages. These will typically succeed after the workflow is re-run, but the option to re-run is not
offered when the workflow run passes.

Because it's important that the data be complete, the `codecov/codecov-action` action is configured to fail the workflow
run if the upload does not succeed. However, the upload will never be able to succeed for workflow runs in a fork where
the owner has not set up Codecov. For this reason, the `fail_ci_if_error` input setting is made conditional upon the
repository name.

The result is:

- Coverage data upload success is required for all workflow runs in the `arduino/arduino-cli` repository.
- Uploads are attempted for workflow runs in forks (because the fork owner might have Codecov set up and want the data),
  but they are not required to succeed and will fail silently.
@per1234 per1234 added type: bug topic: infrastructure Related to project infrastructure labels Aug 13, 2021
@per1234 per1234 requested review from umbynos and cmaglie August 13, 2021 07:31
@per1234 per1234 merged commit 408cee8 into arduino:master Aug 13, 2021
@per1234 per1234 deleted the codecov-upload-fail-conditional branch August 13, 2021 08:27
@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
@per1234 per1234 self-assigned this Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants