Skip to content

AutoscalingRunnerSet resource deletion fails indefinitely when a matching secret never existed #4093

Open
@fheinecke

Description

@fheinecke

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/[email protected]/pkg/internal/controller/controller.go:118
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:328
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:288
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2
	sigs.k8s.io/[email protected]/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggha-runner-scale-setRelated to the gha-runner-scale-set modeneeds triageRequires review from the maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions