Skip to content

Editing (instead of destroying+recreating) an AutoscalingRunnerSet object's runnerScaleSetLabels does not update the registered runner set's labels #4424

@ivucica

Description

@ivucica

Checks

Controller Version

0.14.0

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. In chart `oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set`, forget[^1] to set `scaleSetLabels` [sic] which propagates into `runnerScaleSetLabels`.
2. Edit the chart values and correctly set `scaleSetLabels`.
3. Confirm this is updated in local `AutoscalingRunnerSet`.
4. On Github.com web UI, observe how the neither the runner set nor the runner have any labels on it.
5. Destroy the `AutoscalingRunnerSet` (and separately remove the Helm chart installation matching it).
6. Create it again by applying the chart again.
7. Observe how the runner set is recreated with correct charts visible on Github.com web UI.

[^1]: I have actually set `runnerScaleSetLabels` per documentation, but that's not what the chart uses.

Describe the bug

The change in labels does not apply the new labels to the runner set via the api, nor (if that is required) recreate the ephemeral runner set, nor does it recreate the runner itself.

Describe the expected behavior

Updating spec.runnerScaleSetLabels on the custom resource for AutoscalingRunnerSet should update labels for runners, as correct labels are critical for running GHA actually finding the correct runner to run the workload on. Whether this is done by destroying and recreating the EphemeralRunnerSet and EphemeralRunner objects, and destroying and re-creating the runner scale set entry in the github.com API (visible on the web), is less important -- but it is essential that the runners have labels actually applied to them when the API calls are made.

Additional Context

Interestingly, even after this the runner has no labels attached to it, but I have not attempted to trace this behavior so I am not filing a separate bug.


$ curl -H "Authorization: Bearer $(grep github_token: 03-pat.secrets.yaml | cut -d':' -f 2)" https://api.github.com/repos/PERSON_USER_HERE/REPO_HERE/actions/runners 
{
  "total_count": 1,
  "runners": [
    {
      "id": 30,
      "name": "arc-runner-set-mwg24-runner-76xbl",
      "os": "unknown",
      "status": "online",
      "busy": false,
      "labels": [

      ]
    }
  ]
}


I have had to set the labels manually:


curl -X POST -d '{"labels":["arc-runner-set"]}' -H "Authorization: Bearer $(grep github_token: 03-pat.secrets.yaml | cut -d':' -f 2)" https://api.github.com/repos/PERSON_USER_HERE/REPO_HERE/actions/runners/$(curl -H "Authorization: Bearer $(grep github_token: 03-pat.secrets.yaml | cut -d':' -f 2)" https://api.github.com/repos/PERSON_USER_HERE/REPO_HERE/actions/runners |  jq -r .runners[0].id)/labels


I would have expected this property to propagate through `EphemeralRunnerSet` into `EphemeralRunner`  object, and then when the runner is created the labels are set -- even if the `AutoscalingRunnerSet` does not do it itself.

Controller Logs

n/a not useful, the code simply does not attempt to patch the labels after the initial creation

Runner Pod Logs

n/a not useful

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggha-runner-scale-setRelated to the gha-runner-scale-set mode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions