Skip to content

Guard legacy runner status in graphql by feature flag

Vladimir Shushlin requested to merge vshushlin/runner-status-ff into master

What does this MR do and why?

We want to remove legacy status from graphql in %16.0, this MR adds a feature flag to make the feature removal more controlled.

I don't plan to "rollout" it, just 100% enable in one day, and then we'll shortly remove it in Remove legacy mode for runnner graphql status (!117886 - merged)

How to set up and validate locally

  1. create runner

  2. pause it

  3. run the following query in the : /-/graphql-explorer

    query {
      project(fullPath: "root/main") {
        id
        fullPath
        runners {
          nodes {
            status(legacyMode: "14.5")
          }
        }
      }
    }

    You will get:

    {
      "data": {
        "project": {
          "id": "gid://gitlab/Project/20",
          "fullPath": "root/main",
          "runners": {
            "nodes": [
              {
                "status": "NEVER_CONTACTED"
              },
              {
                "status": "PAUSED"
              }
            ]
          }
        }
      }
    }
  4. Enable FF

    Feature.enable(:disable_runner_graphql_legacy_mode)
  5. Run the query again and get:

    {
      "data": {
        "project": {
          "id": "gid://gitlab/Project/20",
          "fullPath": "root/main",
          "runners": {
            "nodes": [
              {
                "status": "NEVER_CONTACTED"
              },
              {
                "status": "ONLINE"
              }
            ]
          }
        }
      }
    }
  6. Click the invite members button.

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 Vladimir Shushlin

Merge request reports