Skip to content

GraphQL: Add allowStaleRunnerPruning to Group

Pedro Pombeiro requested to merge pedropombeiro/361112/add-graphql-query into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR adds an allowStaleRunnerPruning EE-only property to GroupType. It exposes the new namespace_ci_cd_settings.allow_stale_pruning property.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

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

  1. Visit http://gdk.test:3000/-/graphql-explorer

  2. Use the following query:

    query {
      group(fullPath:"gitlab-org") {
        fullName
        allowStaleRunnerPruning
      }
    }
  3. The result should look like the following:

    	{
    		"data": {
    			"group": {
    				"fullName": "Gitlab Org",
    				"allowStaleRunnerPruning": false
    			}
    		}
    	}
  4. You can try manipulating the database value of the property in order to confirm that the value reflects reality. In the GDK console:

    [2] pry(main)> Group.find_by_full_path('gitlab-org').allow_stale_runner_pruning = true
    => true
  5. The result should look like the following:

    	{
    		"data": {
    			"group": {
    				"fullName": "Gitlab Org",
    				"allowStaleRunnerPruning": 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