Skip to content

Shared runners still showing in list projects runner when shared runners disabled for project

Summary

As stated in https://gitlab.com/gitlab-org/gitlab-ce/issues/52837#note_109951731 by @JonathonReinhart the documentation for List project's runners states that "shared runners are listed if at least one shared runner is defined and shared runners usage is enabled in the project's settings." using the API you still get all the shared runners even though in the project settings they are disaled. I'm not sure if this is just the documentation being misleading to the is actually a bug in the API.

Steps to reproduce

  1. Have shared runners available to a project
  2. Disable shared runners Settings > CI/CD > Runners
  3. Send a request to gitlab.example.com/api/v4/projects/14/runners
  4. Get a list of runners, like this example

What is the current bug behavior?

Shared runners are still listed, when the project settings disables them. (According to current documentation)

What is the expected correct behavior?

Shared runners should not be listed (According to current documetnation)

Relevant logs and/or screenshots

Screen_Shot_2018-10-19_at_09.53.02

Output of checks

This bug happens on GitLab.com

Versions I tried also are 11.2, 11.3

Fix

This is intended behaviour, just the documentation is out of sync/not correct. In the admin panel, we still keep showing the shared runners even if shared runners are disabled, for reasons/arguments specified in https://gitlab.com/gitlab-org/gitlab-ce/issues/52918#note_110180544 it's also a better solution to have the API mimic the UI behavior thus keep the behavior as is.

Edited by Steve Xuereb