Skip to content

GraphQL: Expose CiRunnerType.creationMethod

What does this MR do and why?

This MR extends the CiRunnerType GraphQL type to expose the registration_type field, so that:

  • users can write scripts that allow e.g. checking/deleting runners that were created by the legacy method
  • showing this indicator in the runners admin view

Part of #460930

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Create a runner in http://gdk.test:3000/admin/runners

  2. Register a runner with the runner registration token in the kebab menu near New instance runner button in http://gdk.test:3000/admin/runners. You may need to enable runner registration tokens in http://gdk.test:3000/admin/application_settings/ci_cd.

  3. Run the following query in http://gdk.test:3000/-/graphql-explorer:

    query {
      runners {
        nodes {
          id
          runnerType
          creationMethod
        }
      }
    }

You should see both runners, one with "creationMethod": "AUTHENTICATED_USER" and the other with "creationMethod": "REGISTRATION_TOKEN".

Edited by Pedro Pombeiro

Merge request reports