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

Bug: Generate and use a token for codecov.io uploads #560

Open
smoser opened this issue Nov 21, 2023 · 0 comments
Open

Bug: Generate and use a token for codecov.io uploads #560

smoser opened this issue Nov 21, 2023 · 0 comments
Labels

Comments

@smoser
Copy link
Contributor

smoser commented Nov 21, 2023

stacker version

53bc049

Describe the bug

We saw code-coverage failures in #557 (which should not have caused any code coverage changes, and certainly not almost complete loss of coverage). I attempted to fix that in #558, and @rchincha attempted and landed a change under #559 .

I looked into this further as ordering of an upload did not seem like it should cause coverage to break. As far as I can tell, the reason for failure of #557's report of code coverage is described in codecov.com forum here .

The solution:

What should I do about it?
Although there is no 100% way of guaranteeing success, we recommend two ways of dramatically increasing successful uploads:

  1. Add in the Codecov upload token 278 even if your project is public. It is recommended to add it as an environment secret as opposed to hard-coding.
  2. Re-trying the upload step in CI/CD.

Basically... it appears that codecov.io will always have some transient failures in upload (:disappointed: ) but using a token is reported to dramatically improve things.

You can see failures to upload in the action logs here.

  1. Pick a build or coverage run on the left
  2. expand the 'Upload code coverage' output
  3. search for 'error' (or 'error uploading')

For this particular ci-run, each of build/priv, build/unpriv, coverage/priv failed with message below. Only coverage/unpriv succeeded in uploading.

[2023-11-20T23:02:17.814Z] ['error'] There was an error running the uploader: Error uploading to 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')}

To reproduce

  1. Configuration
  2. Client tool used
  3. Seen error

Expected behavior

No response

Screenshots

No response

Additional context

No response

@smoser smoser added the bug label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant