Skip to content

Self Hosted Runner Registration Not Honouring RunnerGroup Provided #4091

@aakashksunny13

Description

@aakashksunny13

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions