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: failure of coverage upload doesn't change job status #16379

Open
bsipocz opened this issue May 3, 2024 · 7 comments · Fixed by OpenAstronomy/github-actions-workflows#199

Comments

@bsipocz
Copy link
Member

bsipocz commented May 3, 2024

Recently the coverage status upload ran into a github rate limit, but this didn't change the status of the job from green to red, instead generated false coverage % that sent us on a bit of a wild goose chase. Ideas how to improve CI:

  • fail the job status if the upload fails, so it will be much easier to spot the issue and restart the job
  • add in a sleep and retry logic in case of upload failure
@bsipocz
Copy link
Member Author

bsipocz commented May 3, 2024

There is a long standing upstream feature request for this here: codecov/codecov-action#926

It also links to many implemented workarounds, so I strongly suggest to adopt one of those instead (e.g. wrapping it all in a retry action) of waiting for an upstream, out-of-the box fix.

This should be an easy starter issue for a newcomer.

@pllim
Copy link
Member

pllim commented May 3, 2024

cc @rosteen since he was just struggling with this same problem over at jdaviz.

@pllim
Copy link
Member

pllim commented May 6, 2024

Thanks for the info, @bsipocz ! I will investigate.

@pllim pllim self-assigned this May 6, 2024
@pllim
Copy link
Member

pllim commented May 7, 2024

Looking at the linked issue, I see two possible ways forward. Example implementations of each:

  1. upload coverage in separate step nextcloud/appstore#1294 -- This does not require third-party Action. I think maintainer re-triggers only the upload part when upload fails. No automatic retry but Actions are guaranteed to be supported long time and no need to re-run the test suite.
  2. Use the retry-action action to retry the codecov uploader action tagatac/bagoup#57 -- This uses a third-party Action. Looks super convenient but there is no guarantee upload would be successful within the attempts (which means you have to rerun everything again if that fails anyway) and not sure how long this Action is going to be maintained going forward.

I am leaning towards Option 1 for both astropy and jdaviz. What do you think, @bsipocz and @rosteen ?

@bsipocz
Copy link
Member Author

bsipocz commented May 7, 2024

The first one is fine, I think basically anything is fine that avoids rerunning the tests because of an upload error.

@pllim
Copy link
Member

pllim commented May 8, 2024

Huh, I think for astropy, I actually have to patch the OpenAstronomy workflow (OpenAstronomy/github-actions-workflows#199), but not for jdaviz (spacetelescope/jdaviz#2865).

@pllim
Copy link
Member

pllim commented Jun 5, 2024

@astrofrog reverted my attempt to address this at OpenAstronomy/github-actions-workflows#206

Also it never quite work because of a token failure that I cannot understand: #16535

So, for now, just check the logs diligently if you want to know if the upload really happened or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants