Skip to content

Add CreateRunner Mutation Endpoint

Tymm Schmitke requested to merge tschmitke/387808/add_mutation_endpoint into master

What does this MR do and why?

As part of building out the mutation to create runners, this MR introduces the mutation endpoint. The service to create the runner is introduced in !110076 (merged) and should be merged before this MR. The policies to authorize creating runners with this method are behind the feature flag create_runner_workflow and are introduced in !109531 (merged).

Screenshots or screen recordings

GQL mutation creating an instance runner

Here is the mutation creating and returning an instance runner with some of the fields set by the input.

How to set up and validate locally

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

  1. Enable the feature flag locally in a rails console bin/rails c:

    Feature.enable(:create_runner_workflow)
  2. Visit http://gdk.test:3000/-/graphql-explorer

  3. Run this mutation:

    mutation runnerCreate($input: RunnerCreateInput!) {
      runnerCreate(input: $input) {
        runner {
          ephemeralAuthenticationToken
    
          runnerType
          description
          maintenanceNote
          paused
          tagList
          accessLevel
          locked
          maximumTimeout
          runUntagged
        }
        errors
      }
    }

and some example variables

```json
{
  "input": {
    "description": "my awesome description",
    "maintenanceNote": "often.",
    "paused": true
  }
}
```

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Pedro Pombeiro

Merge request reports

Loading