actions / actions/runner

Self Hosted Runner Registration Not Honouring RunnerGroup Provided

Open
#4,091 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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:

  1. Register a self hosted runner with name runner1 in runnerGroup1
  2. Shutdown/stop runner1 so that it will go offline mode in GitHub UI
  3. Register a self hosted runner with name runner1 in runnerGroup2
  4. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.