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

Improve runner deletion by using busy flag #166

Closed
gertjanmaas opened this issue Aug 26, 2020 · 4 comments · Fixed by #1832
Closed

Improve runner deletion by using busy flag #166

gertjanmaas opened this issue Aug 26, 2020 · 4 comments · Fixed by #1832
Labels
enhancement New feature or request

Comments

@gertjanmaas
Copy link
Collaborator

When building this solution the Github API couldn't tell if a runner was busy or not, so we resorted to trying to delete each runner via de API. If that returned a 500 Internal Server Error, we would know if it was busy.

Just played with the API again and saw the busy flag was added for runners. See https://docs.github.com/en/rest/reference/actions#list-self-hosted-runners-for-a-repository

Instead of trying to delete a runner we should use this flag so reduce the number of API calls on Github.

@gertjanmaas gertjanmaas added the enhancement New feature or request label Aug 26, 2020
@samuelb
Copy link
Contributor

samuelb commented Jan 26, 2022

The admin of the Github Enterprise installation we have in our company came to me and complained that 99% of the HTTP 500 errors are coming from our Github Actions runners. While I understand that this is technically not a problem, I fear that every time there is an issue with Github Enterprise, they will find those HTTP 500s in the logs and I have to explain the situation to them. So I would appreciate if those HTTP 500 would be gone or get reduced :)

@ScottGuymer
Copy link
Member

Looking at the code this behaviour is in the scale-down lambda somewhere here

Do you think you would be able to create a PR to enhance this? Would be more than happy to review.

@samuelb
Copy link
Contributor

samuelb commented Jan 26, 2022

I already tried to change it by my own. Since I never worked with TypeScript before, I'm struggling with the unit tests at least. With what I ended up two days ago can be found in this branch.

@ulich
Copy link
Contributor

ulich commented Mar 8, 2022

@samuelb I'm happy to assist and continue the work from you and create a PR. Would you be ok with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants