unitaryfund / mitiq

Mitiq is an open source toolkit for implementing error mitigation techniques on most current intermediate-scale quantum computers.
https://mitiq.readthedocs.io
GNU General Public License v3.0
358 stars 157 forks source link

Codecov upload fails intermittently #1584

Closed Misty-W closed 5 months ago

Misty-W commented 1 year ago

Codecov upload fails intermittently on python 3.10

Error message:

[2022-11-07T22:47:33.789Z] ['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')} Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3.1.1/dist/codecov' failed with exit code 255

natestemen commented 1 year ago

Can you link to an example of this happening?

Misty-W commented 1 year ago

https://github.com/unitaryfund/mitiq/actions/runs/3414551571/jobs/5682658859

Misty-W commented 1 year ago

Another example: https://github.com/unitaryfund/mitiq/actions/runs/3365792242/jobs/5581622895

Misty-W commented 1 year ago

There might be more, these are two I could find in the recent workflow history.

natestemen commented 1 year ago

Looks like codecov is aware of this issue and is working on a fix: https://github.com/codecov/feedback/issues/126.

Editing the title since even though it seems to be related to python 3.10, I don't think it really is.

Misty-W commented 1 year ago

Thanks for looking into this @natestemen! As a temporary workaround we could consider adding a retry if upload fails, which is what Codecov seems to recommend. Right now our workflow doesn't allow us to retry upload by itself, so the whole test has to be re-run and can only be re-run after all others finish (which is another matter).

natestemen commented 1 year ago

Can you link to where that's recommended? From what I see they are recommending using a token: https://github.com/codecov/feedback/issues/126. This has the downside of not running on PRs opened from forks. The other option is to make the token public, which is not ideal, but could be okay if we really want to close this.

I'm fine with re-running the tests occasionally and so happy to wait for an upstream fix. Understand if you/others want a quicker fix, however.

Misty-W commented 1 year ago

Another instance: https://github.com/unitaryfund/mitiq/actions/runs/3678209678/jobs/6221187190

natestemen commented 5 months ago

This should hopefully be fixed by https://github.com/unitaryfund/mitiq/pull/2271. Will close for now, and reopen if the token doesn't fix the issue.

cc @cosenal @nathanshammah