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
CI: Add a retry on codecov upload. #1288
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #1288 +/- ##
=======================================
Coverage 89.39% 89.39%
=======================================
Files 181 181
Lines 24086 24086
Branches 3665 3665
=======================================
Hits 21532 21532
Misses 1980 1980
Partials 574 574 ☔ View full report in Codecov by Sentry. |
Hard to figure out if this helps on a randomly occuring issue 🤔 But at least it seems to work on the happy case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this and I dislike this at the same time :)
Exactly 🌈 |
Do you know if this actually sovles the issue? So does this even work? Do you have a case where a retry worked? I am fine with merging this, but it might jsut be useless, as long as we don't understand the issue 😅 |
Alternative idea. It's just that we had so many problems with codecov, and we are rarely using it. Otherwise, I'm fine merging it if you think it's worth it! |
Michel: no, I'm not sure how to trigger an error, would you know ? We can randomly trigger it and wait to see a good example 😅 otherwise, this CI run shows that it seems to just work when codecov just works, so it doesn't seem to make the happy case worse About understanding the issue, there's a lot of small different ones that can happen, since it's an online service. I can try and find the issue on the codecov action that discussed this. But ultimately, we can't do without the possibility of it failing. So sticking with an online service, I don't see a better option than wait&retry? Mathieu: I don't know about other contributors, but I do use it and like it a lot! I would be fine with an alternative, I will see if I find something |
Here the mentioned issue : codecov/codecov-action#926 |
No, I don't know when it happens. I think I once found an issue explaining that it was essentially them going over their bandwidth, but not sure where I found that. I guess the line by line view is quite valuable and I do use it for that too sometimes. If we could have an offline version doing that, that would be fine for me as well. Though having a PR comment telling us how coverage changed can be quite useful at times, IMO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can merge this and figure out if we drop it entirely later? @math-fehr?
<!-- Please add a title in the form of a great git commit message in the imperative mood (https://cbea.ms/git-commit/) --> **What is changing**: Use https://github.com/Wandalen/wretry.action to retry https://github.com/codecov/codecov-action. Inspired by xdslproject/xdsl#1288. **Why this change is being made**: The codecov action fails often: - https://github.com/tagatac/bagoup/actions/runs/7089000221/job/19292737639#step:7:31 - https://github.com/tagatac/bagoup/actions/runs/7089000221/job/19293026056#step:7:31 - https://github.com/tagatac/bagoup/actions/runs/7089000221/job/19293200011#step:7:31 - https://github.com/tagatac/bagoup/actions/runs/7089000221/job/19293438478#step:7:31 ``` [2023-12-04T15:47:46.155Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](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')} ``` But succeeds eventually on retry: https://github.com/tagatac/bagoup/actions/runs/7089000221/job/19293933175#step:7:34 **Related issue(s)**: codecov/codecov-action#926 **Follow-up changes needed**: Remove this when codecov/codecov-action#926 is resolved (or Github Actions offers a built-in retry mechanism for actions). **Is the change completely covered by unit tests? If not, why not?**: N/A
Had an issue again with codecov, figured we might want to try something like this.
Just an auto-retry, 10 times spaced by 10 seconds here.