actions / actions/actions-runner-controller

AutoscalingRunnerSet resource deletion fails indefinitely when a matching secret never existed

Open
#4,093 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug gha-runner-scale-set needs triage
Dominant language
Go
Stars
6.5k
Forks
1.5k
Avg merge
2d 2h
Merged PRs (30d)
27

Description

Checks
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.