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

Clean up as much as possible in a single pass for the EphemeralRunner reconciler #3941

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nikola-jokic
Copy link
Collaborator

In addition to cleaning up as many resources as possible in a single pass on the ephemeral runner reconciler, an additional check has been added to check if the container has a hook configured.

The check goes through the runner's environment variables and looks for ACTIONS_RUNNER_CONTAINER_HOOKS.
Previously, the controller would always check if there were leftover resources linked to the runner. This check is not necessary when the container hook is not configured.

Also, it is important to point out that in most cases, there will be no resources linked to the runner, unless the runner is forcefully terminated without having a chance to call the hook to clean them up. Nevertheless, the only way to configure the container hook for the runner is to pass the ACTIONS_RUNNER_CONTAINER_HOOKS environment variable to the container. Unless the environment variable is baked into the custom-built runner image, the check will work as expected.

@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gha-runner-scale-set Related to the gha-runner-scale-set mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant