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

Add support for GH job completion / autoscaling webhook #14

Open
johnsca opened this issue Nov 22, 2021 · 1 comment
Open

Add support for GH job completion / autoscaling webhook #14

johnsca opened this issue Nov 22, 2021 · 1 comment

Comments

@johnsca
Copy link
Contributor

johnsca commented Nov 22, 2021

https://github.blog/changelog/2021-09-20-github-actions-ephemeral-self-hosted-runners-new-webhooks-for-auto-scaling/

The ephemeral runner flow is now officially supported and with that they added a webhook to be notified when a workflow job is requested or changes state. This means that instead of the complicated polling logic that we currently have, we could just use the webhook to be told when the runner is done and needs to be replaced.

It also, of course, allows for runners to be spun up or scaled out on demand, if desired, based on the load, which could make for more efficient use of resources.

The one caveat with this is that, since it's a webhook endpoint, that will need to be exposed so that GitHub can connect to it, where the current implementation only requires outbound access from the runners to GH.

@ijansky
Copy link
Contributor

ijansky commented Feb 15, 2022

I believe that autoscaling could be achieved by LXD Events as well. Given that containers shut down after a job gets executed, listening for one of the instance-shutdown, instance-stopped, or instance-deleted events could result in a new instance being spawned. All that without opening any firewall ports.

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

No branches or pull requests

2 participants