Skip to content

Improve runner deletion by using busy flag #166

Closed

Description

@gertjanmaas

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.

Activity

  1. added
    enhancement
    on Aug 26, 2020
  2. samuelb commented on Jan 26, 2022

    @samuelb
    Contributor

    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 :)

  3. ScottGuymer commented on Jan 26, 2022

    @ScottGuymer
    Contributor

    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.

  4. samuelb commented on Jan 26, 2022

    @samuelb
    Contributor

    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.

  5. ulich commented on Mar 8, 2022

    @ulich
    Contributor

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions