Self Hosted Runner Registration Not Honouring RunnerGroup Provided
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
If we have an existing runner in offline mode with name runner1 part of runnerGroup1 in offline mode then while provisioning a new runner with same name(runner1) specifying it to be part of runnerGroup2 as part of config command, runner will still register in runnerGroup1
This is problematic when hostname/private ip-address is used for runner names which can be re-used by infra provider after a period of time even though runner1 was not explicitly cleaned up from Github UI
To Reproduce
Steps to reproduce the behavior:
- Register a self hosted runner with name runner1 in runnerGroup1
- Shutdown/stop runner1 so that it will go offline mode in GitHub UI
- Register a self hosted runner with name runner1 in runnerGroup2
- We will see runner1 still being part of runnerGroup1 with following logs
A runner exists with the same name √ Successfully replaced the runner
Expected behavior
runner1 should be in runnerGroup2 after step 3
Runner Version and Platform
v2.329.0?
OS of the machine running the runner? Linux
What's not working?
Please include error messages and screenshots.
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
A runner exists with the same name √ Successfully replaced the runner during registration using config.sh
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the config.sh registration flow and the code that handles the “A runner exists with the same name” replacement path. Reproduce the sequence with runner1 in runnerGroup1 and then runnerGroup2, using the registration logs to trace the group value. Done means the replacement runner is assigned to runnerGroup2 and the behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100