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

CI: Add a retry on codecov upload. #1288

Merged
merged 1 commit into from Jul 20, 2023
Merged

CI: Add a retry on codecov upload. #1288

merged 1 commit into from Jul 20, 2023

Conversation

PapyChacal
Copy link
Collaborator

@PapyChacal PapyChacal commented Jul 17, 2023

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.

@PapyChacal PapyChacal added the CI Continuous Integration label Jul 17, 2023
@PapyChacal PapyChacal self-assigned this Jul 17, 2023
@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (a241d20) 89.39% compared to head (0954977) 89.39%.

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@PapyChacal
Copy link
Collaborator Author

Hard to figure out if this helps on a randomly occuring issue 🤔 But at least it seems to work on the happy case

@PapyChacal PapyChacal changed the title [WIP] CI: Add a retry on codecov upload. CI: Add a retry on codecov upload. Jul 17, 2023
@PapyChacal PapyChacal marked this pull request as ready for review July 17, 2023 14:47
Copy link
Member

@superlopuh superlopuh left a 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 :)

@PapyChacal
Copy link
Collaborator Author

I like this and I dislike this at the same time :)

Exactly 🌈

@webmiche
Copy link
Collaborator

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 😅

@math-fehr
Copy link
Collaborator

Alternative idea.
Currently, we are using codecov to look online the coverage of our project.
Would there be a way to have this working offline? We compute the coverage using coverage anyway, maybe there is an offline tool that we could run in the CI and that would have a similar output?

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!

@PapyChacal
Copy link
Collaborator Author

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

@PapyChacal
Copy link
Collaborator Author

Here the mentioned issue : codecov/codecov-action#926

@webmiche
Copy link
Collaborator

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

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.

Copy link
Collaborator

@webmiche webmiche left a 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?

@AntonLydike AntonLydike merged commit 7936261 into main Jul 20, 2023
10 checks passed
@AntonLydike AntonLydike deleted the emilien/codecov-retry branch July 20, 2023 11:49
tagatac added a commit to tagatac/bagoup that referenced this pull request Dec 4, 2023
<!-- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants