Roles and Permissions UI doesn't render if memberRoles is null
Summary
If getGroupRoles GraphQL query returns null for memberRoles, the "Roles and Permissions" UI doesn't render properly. A spinning wheel displays indefinitely, and the following error is visible in the browser's console:
console.ts:39 TypeError: Cannot read properties of null (reading 'nodes') at a.customRoles (roles_crud.vue:65:1) at a.roles (roles_crud.vue:72:1) at a.<anonymous> (roles_crud.vue:1:1850)
We can see this in the GraphQL response:
"memberRoles": null,
This issue was raised after a GitLab customer experienced this error on GitLab.com.
Looks similar to a recent issue that was fixed in v17.11, and was also related to null values causing errors: #523627 (closed)
Steps to reproduce
GitLab Support has not been able to independently reproduce with another namespace. However, we have reproduced the error by accessing the Roles and Permissions page for the affected namespace (see ticket details).
I tried reproducing on self-managed nightly image, but this is only reproducible on .com for Group Roles and Permissions.
Example Project
What is the current bug behavior?
The Roles and Permissions UI doesn't render, and a spinning wheel indefinitely displays
What is the expected correct behavior?
The UI renders correctly, and if there was an error, display a flash message
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
GitLab.com
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
Patch release information for backports
If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.
Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.
High-severity bug remediation
To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.