Skip to content

Remove check if runner exists after exit code 0 #4142

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nikola-jokic
Copy link
Collaborator

When the runner exits, we check if it still exists within the actions service. If it doesn't, we mark it as finished.

There is a delay between runners being deleted, so the check can rarely return an incorrect result.

This change aims to remove this check completely. The ephemeral runner controller will only react to the exit code of the runner. If the runner exits with the exit code 0, that means that the runner has successfully executed the job.

Fixes #4136

@Copilot Copilot AI review requested due to automatic review settings June 24, 2025 11:33
@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label Jun 24, 2025
@nikola-jokic nikola-jokic requested review from rentziass and a team as code owners June 24, 2025 11:33
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the check that verifies whether a runner exists within the service after the runner Pod exits with code 0 and simplifies the success handling in the EphemeralRunner controller.

  • Removed test case for verifying runner existence after exit 0
  • Eliminated the logic to query the actions service to check the runner registration
  • Cleaned up the now-unused helper function runnerRegisteredWithService

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
controllers/actions.github.com/ephemeralrunner_controller_test.go Removed obsolete test case for runner existence after successful exit
controllers/actions.github.com/ephemeralrunner_controller.go Simplified controller logic by removing the redundant runner check

@JohnYoungers
Copy link

would it be possible to publish a patch release based on this fix? I think everyone currently playing the recurring delete ephemeralrunner {old-runner} game would appreciate it

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.

EphemeralRunners are stuck in failed state after the job succeeds
3 participants