Support cost factor fields in runner creation GraphQL

What does this MR do and why?

Support cost factor fields in runner creation GraphQL

In favor of managing GitLab.com Hosted Runners through Terraform, we must make cost factor fields editable with an API. That's a requiremet for making the GitLab Provider for Terraform able to handle that.

This commit adds needed GraphQL updates to support the fields in API.

Related to Manage Hosted Runners tokens through Terraform (gitlab-org/ci-cd/shared-runners/infrastructure#263) • Unassigned

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

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.

Before After

How to set up and validate locally

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

  1. Run the following mutation on http://gdk.test:3000/-/graphql-explorer:

    mutation runnerUpdate($input: RunnerUpdateInput!) {
      runnerUpdate(input: $input) {
        runner {
          id
          runnerType
          privateProjectsMinutesCostFactor
          publicProjectsMinutesCostFactor
        }
        errors
      }
    }

    Variables (pick the ID of an existing runner with puts Ci::Runner.last.to_global_id):

    {
      "input": {
        "id": "gid://gitlab/Ci::Runner/1053",
        "privateProjectsMinutesCostFactor": 0.5
      }
    }
Edited by Pedro Pombeiro

Merge request reports

Loading