Error viewing CI/CD variable settings with custom role

Summary

We have received a report from a customer where users with a custom role get the below error (alert box) when navigating to the CI/CD settings page (https://gitlab.com/path/to/project/-/settings/ci_cd#js-cicd-variables-settings):

There was a problem fetching the latest minimum override role.

Screenshot_2025-02-27_at_07.15.03

Steps to reproduce

  • On the top-level group, create a custom role with:
    • Base role: Developer
    • Permission 1: Manage CI/CD variables
    • Permission 2: Manage merge request approvals and settings
  • Create a new project under the top-level group
  • Add a user to the project using the custom role
  • Log in as the user and navigate to https://gitlab.com/path/to/project/-/settings/ci_cd#js-cicd-variables-settings

Example Project

  • Test Project - GitLab Team Members: Please ping me if you want me to add you to the project

What is the current bug behavior?

Users with a custom role get the below error (alert box) when navigating to the CI/CD settings page:

There was a problem fetching the latest minimum override role.

What is the expected correct behavior?

Users with a custom role should be able to navigate to the CI/CD settings page without errors.

Relevant logs and/or screenshots

The core problem seems that for these users with the custom role the GraphQL query getPipelineVariablesMinimumOverrideRoleProjectSetting returns:

{
  "errors": [
    {
      "graphQLErrors": [
        {
          "message": "Cannot return null for non-nullable field ProjectCiCdSetting.pipelineVariablesMinimumOverrideRole"
        }
      ],
      "clientErrors": [],
      "networkError": null,
      "message": "Cannot return null for non-nullable field ProjectCiCdSetting.pipelineVariablesMinimumOverrideRole",
      "stack": "Error\n    at new t (https://gitlab.com/assets/webpack/main.63df4eb5.chunk.js:1:62277)\n    at https://gitlab.com/assets/webpack/main.63df4eb5.chunk.js:1:299158\n    at Object.next (https://gitlab.com/assets/webpack/main.63df4eb5.chunk.js:69:106394)\n    at y (https://gitlab.com/assets/webpack/main.63df4eb5.chunk.js:69:104290)\n    at k (https://gitlab.com/assets/webpack/main.63df4eb5.chunk.js:69:104796)\n    at t.next (https://gitlab.com/assets/webpack/main.63df4eb5.chunk.js:69:105329)\n    at https://gitlab.com/assets/webpack/main.63df4eb5.chunk.js:63:114776\n    at Array.forEach (<anonymous>)\n    at i (https://gitlab.com/assets/webpack/main.63df4eb5.chunk.js:63:114744)\n    at Object.next (https://gitlab.com/assets/webpack/main.63df4eb5.chunk.js:1:277481)"
    }
  ]
}

Output of checks

This bug happens on GitLab.com

Possible fixes

🤷‍♂️

Edited Feb 27, 2025 by Bruno Freitas
Assignee Loading
Time tracking Loading