-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
We use self-hosted runners. If we replace a runner with the same name but different labels, the existing runner gets replaced as expected: The github website shows the new runner with the same name and the new labels under Settings > Actions > Runners. But the new runner still gets assigned to jobs with the old labels with which it is not labeled anymore.
To Reproduce
Steps to reproduce the behavior:
- Create a github actions workflow with a job config that uses 'runs-on' with the label "tst":
runs-on:
- self-hosted
- tst
-
Create a self-hosted runner and configure it with the label "tst". we used
./config.sh --url "https://github.com/${ORGANIZATION}/${REPO}" --token "${REG_TOKEN}" --labels "tst" --name "my-runner" --replace -
Run the job
-
Replace the runner with a new runner with the same name but different labels. we used
./config.sh --url "https://github.com/${ORGANIZATION}/${REPO}" --token "${REG_TOKEN}" --labels "stage" --name "my-runner" --replace
-
Check in github that the runner is labeled with "stage" and not with "tst"
-
Run the job that has runs-on config for "tst" again
-
Bug: The replaced runner picks up the job but github shows it doesn't have the label "tst", only the label "stage".
Expected behavior
The runner should only run the jobs that match the labels it has and not run the jobs that match the labels of the runner it has replaced.
Runner Version and Platform
Version of your runner?
'2.331.0'
OS of the machine running the runner?
"ubuntu-os-cloud/ubuntu-minimal-2404-lts-amd64"
Job Log Output
If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.
Runner and Worker's Diagnostic Logs
If applicable, add relevant diagnostic log information. Logs are located in the runner's _diag folder. The runner logs are prefixed with Runner_ and the worker logs are prefixed with Worker_. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.