actions / actions/actions-runner-controller
AutoscalingRunnerSet resource deletion fails indefinitely when a matching secret never existed
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 1.5k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 27
Description
Checks
- I've already read https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/troubleshooting-actions-runner-controller-errors and I'm sure my issue is not covered in the troubleshooting guide.
- I am using charts that are officially provided
Controller Version
0.8 forward
Deployment Method
Helm
Checks
- This isn't a question or user support case (For Q&A and community support, go to Discussions).
- I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
To Reproduce
1. Deploy an AutoscalingRunnerSet with `.spec.githubConfigSecret = some-non-existent-secret`
2. Realize that the secret name is wrong and try to delete the resource
3. Observe the controller logs:
2025-05-19T21:16:41Z ERROR EphemeralRunner Failed to clean up runner from service {"version": "0.11.0", "ephemeralrunner": {"name":"generic-amd64-runner-1-grss-mfvdt-runner-spkd4","namespace":"gha-runners"}, "error": "failed to get actions client for runner: failed to get secret: secrets \"gha-runner-scale-set-controller-app-creds\" not found"}
github.com/actions/actions-runner-controller/controllers/actions%2egithub%2ecom.(*EphemeralRunnerReconciler).Reconcile
github.com/actions/actions-runner-controller/controllers/actions.github.com/ephemeralrunner_controller.go:82
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile
sigs.k8s.io/controller-runtime@v0.20.3/pkg/internal/controller/controller.go:118
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler
sigs.k8s.io/controller-runtime@v0.20.3/pkg/internal/controller/controller.go:328
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem
sigs.k8s.io/controller-runtime@v0.20.3/pkg/internal/controller/controller.go:288
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2
sigs.k8s.io/controller-runtime@v0.20.3/pkg/internal/controller/controller.go:249
Describe the bug
When attempting to delete an AutoscalingRunnerSet resource with an invalid secret name, deletion fails indefinitely.
Describe the expected behavior
If a matching secret never existed in the first place (so the resource never leaves the "pending" state), the resource should successfully be deleted.
Additional Context
N/A
Controller Logs
https://gist.github.com/fheinecke/24af6c89500e571389fcd22c06579708
Runner Pod Logs
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at controllers/actions.github.com/ephemeralrunner_controller.go:82 and reproduce the deletion flow with an AutoscalingRunnerSet whose githubConfigSecret does not exist. Trace how the pending resource handles cleanup, then verify that deletion completes when the matching secret was never created.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, go, kubernetes
- Domain
- backend, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100