Skip to content

gha-runner-scale-set-0.13.1 installation fails with RunnerScaleSetNotFoundException #4370

Open

Description

@erichorwath

Checks

Controller Version

0.13.1

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

Install 0.12.1, then upgrade to 0.13.1

Describe the bug

After upgrade, listeners are not getting ready:

Application returned an error: createSession failed: failed to create session: failed to do the session request: actions error: StatusCode 404, ActivityID "xxx" Github.Actions.Runtime.WebApi.RunnerScaleSetNotFoundException, Github.Actions.Runtime.WebApi: No runner scale set found with identifier 22.
Image

Describe the expected behavior

listener get ready and helm upgrade succeeds.

Additional Context

K8s 1.32
GHES 3.16

Controller Logs

.

Runner Pod Logs

.

Activity

  1. added
    bug
    needs triage
    gha-runner-scale-set
    on Feb 6, 2026
  2. nikola-jokic commented on Feb 10, 2026

    @nikola-jokic
    Collaborator

    Hey @erichorwath,

    What are the exact steps you took to upgrade?

  3. bavugisainath commented on Feb 24, 2026

    @bavugisainath

    We are experiencing the same issue on our end. We recently created a new EKS cluster v1.35 and installed the ARC controller version 0.13.1, then deployed the scaleset v0.13.1.

    After deploying the listeners, we noticed that the pods are behaving differently compared to version 0.12.1 (which we previously used). One of the listener pods continuously retries and appears to be stuck in a loop, while other listeners on the same node are functioning correctly.

    The behavior seems random, as only specific listener pods are affected.

    Could you please help us investigate this issue?

    K8s 1.35
    GHES 3.17.3
    Karpenter 1.9

  4. jacisko commented on Feb 27, 2026

    @jacisko

    We've done some testing with @erichorwath and performed the following steps:

    gha-runner-scale-set-controller-0.12.1 chart
    helm install acr . --values values.yaml

    gha-runner-scale-set-0.12.1 chart
    helm install runner-scale-set . --values values.yaml

    gha-runner-scale-set-controller-0.13.1 chart
    helm upgrade acr . --values values.yaml

    gha-runner-scale-set-0.13.1 chart
    helm upgrade runner-scale-set . --values values.yaml

    This resulted in the below state where 1 listener pod is being recreated in a loop having error in logs:

    Image

    Error:

    Image

    The current runner scale set after upgrade contains runner scale set id 118, but the failing listener pod keeps referencing the old runner scale set id 117 as seen in the error:

    Image

    The values files are default coming with the default charts, only thing changed was min runners changed from 0 to 1 in gha-runner-scale-set values file.

  5. mrbnd commented on Mar 2, 2026

    @mrbnd

    It looks like, GHA runner after update needs reregistation. What helped it my case. I fully reinstall gha-runner-scale-set helm chart(remove and install from scratch with the same values.yaml).

    p.s. just restart pods didn't help

  6. jacisko commented on Mar 23, 2026

    @jacisko

    Dear @nikola-jokic , is the scenario clear enough to be debugged? In case of questions let us know.
    Hello @mrbnd - such an approach is not feasible in production environments.

  7. pulkitanz commented on Apr 28, 2026

    @pulkitanz

    I am facing this as well on upgrades +1

  8. diogotorres97 commented on Jul 14, 2026

    @diogotorres97
    Contributor

    Hit this on 0.14.2 and traced it through the source. The root cause is that a stale-but-parseable scale set ID is never validated against the Actions service, and nothing rebuilds the listener once it holds one. That's why restarting pods doesn't help and why a full reinstall is currently the only way out.

    Trace (chart 0.14.2, github.com/actions/scaleset v0.4.0):

    1. AutoscalingRunnerSetReconciler re-registers a scale set only when the runner-scale-set-id annotation is absent, non-numeric, or <= 0 (controllers/actions.github.com/autoscalingrunnerset_controller.go:186-198). An ID that parses fine but no longer exists on the Actions service is never checked, so the controller keeps reconciling around a dead ID indefinitely.
    2. The ID is copied into the AutoscalingListener spec once, at construction (controllers/actions.github.com/resourcebuilder.go:136) and handed to the listener pod's config (:195). Nothing ever compares a live listener's RunnerScaleSetId back to the annotation.
    3. The listener is only rebuilt when the values-hash or ListenerSpecHash() changes (autoscalingrunnerset_controller.go:271-275) — and ListenerSpecHash() hashes ars.Spec only, so annotations are not part of it (apis/actions.github.com/v1alpha1/autoscalingrunnerset_types.go:357-361).
    4. The listener has no recovery path. createMessageSession requires a 200 (scaleset/session_client.go:57-66); any other status returns an error that propagates straight out of main() (cmd/ghalistener/main.go:84-86). The pod exits and CrashLoopBackOffs forever on RunnerScaleSetNotFoundException.

    Two consequences that are worth calling out, because they make the usual remedies fail:

    • Fixing the annotation by hand is not sufficient. Per (3), the existing AutoscalingListener is never rebuilt, so it keeps the old ID. The minimal repair is to delete the runner-scale-set-id annotation and delete the AutoscalingListener.
    • Deleting the AutoscalingRunnerSet can hang in Terminating. The finalizer calls DeleteRunnerScaleSet, which requires exactly a 204 (scaleset/client.go:494-496). When the scale set is already gone from the Actions service, that delete 404s, the error propagates (autoscalingrunnerset_controller.go:691-695), and the finalizer never completes — you have to strip it by hand. Happy to file that separately if it's not already tracked.

    The fix looks cheap: GetRunnerScaleSetByID is already declared on the controller's client interface (controllers/actions.github.com/multiclient/multi_client.go:55) and, as far as I can tell, is never called anywhere outside the test fake. Validating the annotated ID on reconcile — re-creating the scale set (or falling back to the existing lookup by name + runner group at autoscalingrunnerset_controller.go:497) when the service returns 404 — would make this self-healing. Including the scale set ID in whatever triggers a listener rebuild would close the second half.

    Worth noting #4561 is the same bug with a different field: ephemeralRunnerSetName is also write-once in the listener spec (resourcebuilder.go:139) and never reconciled against reality. A general "reconcile the listener's references instead of stamping them once" fix would cover both.

  9. added 2 commits that reference this issue on Jul 14, 2026
    a1a8aba
    0a22a74
  10. 27Bslash6 commented on Jul 26, 2026

    @27Bslash6

    Additional data point: this same no-revalidation gap turns a GitHub-server-side scale set deletion into a permanent outage — no upgrade involved. @diogotorres97's trace above matches exactly what we hit.

    Setup: chart 0.14.0 (gha-runner-scale-set), github.com (not GHES), org-level runner groups, GitHub App auth, two scale sets in one org.

    Timeline (2026-07-25, UTC):

    1. From 12:20:02Z the broker started returning 500s on GET https://broker.actions.githubusercontent.com/scalesets/message (matching the GitHub Actions incidents declared that day at 08:59Z and 12:31Z). Listeners exhausted retries and exited; sessions were deleted on shutdown as normal.
    2. During this window some listener restarts also crashed with [ERR] GET request failed: Get "": unsupported protocol scheme "" — CreateMessageSession succeeded but returned an empty messageQueueUrl (scaleset client v0.2.0; presumably a broker-degradation artifact).
    3. At 12:37:17Z and 12:37:43Z respectively, both scale sets (ids 4 and 5) began returning 404 RunnerScaleSetNotFoundException on session creation — GitHub no longer knew them. They 404'd within 26 seconds of each other; App auth kept working; a second org on the same cluster was untouched. Request ids, in case anyone from GitHub looks: first 404s D072:4622:2BFCB7A:2C921CE:6A64ADDD (id 4), D012:4622:2C13DC8:2CA9874:6A64AE17 (id 5); a JIT-config 404 D088:5D98D:FB1787:FF33D6:6A655245.
    4. From there the behaviour is exactly the trace above: listeners crash-loop on session creation forever, the EphemeralRunnerSet keeps minting JIT configs against the dead id (each runner stuck without a RUNNERID), and helm upgrade fixes nothing because the annotation, the ERS spec, and the listener config secret all survive upgrades. All jobs queue indefinitely; zero self-healing.

    Manual recovery that works (per scale set):

    1. kubectl -n <ns> annotate autoscalingrunnerset <name> runner-scale-set-id- → controller re-registers a fresh scale set (name-idempotent) and writes the new id back.
    2. kubectl -n <ns> delete ephemeralrunnerset <name>-<hash> → recreated against the new id.
    3. kubectl -n <controller-ns> delete autoscalinglistener <name>-<hash>-listener (last, after the ERS is recreated) → config secret regenerates with the new id.

    We've since automated that recipe in a CronJob gated on RunnerScaleSetNotFoundException appearing in listener logs, but it's a workaround. The actual fix is what's described above: when session creation (or JIT config generation) returns RunnerScaleSetNotFoundException for a cached id, the controller should treat the cached id as invalid and re-run the registration path it already has for the missing-annotation case, then roll the dependent resources. A stale-but-parseable id should not be more trusted than no id at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggha-runner-scale-setneeds triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions