doc/user/project/codeowners/troubleshooting.md
{{< details >}}
{{< /details >}}
When working with Code Owners, you might encounter the following issues.
For more information about how the Code Owners feature handles errors, see error handling.
{{< history >}}
accessible_code_owners_validation. Disabled by default.accessible_code_owners_validation removed.{{< /history >}}
[!flag] The availability of this feature is controlled by a feature flag. For more information, see the history.
When viewing a CODEOWNERS file, GitLab runs
validations to help you find syntax and permission issues. If no syntax issues
are found, GitLab:
How this works:
The CODEOWNERS file must be present in the target branch before the
merge request is created.
Code Owner approval rules only update when the merge request is created.
If you update the CODEOWNERS file, close the merge request and create a new one.
A Code Owner approval rule is optional if any of these conditions are true:
A user might not show as an approver on the Code Owner merge request approval rules if any of these conditions are true:
CODEOWNERS file.You might get an error that states:
Approval rule is invalid.
GitLab has approved this rule automatically to unblock the merge request.
This issue occurs when an approval rule uses a Code Owner that is not a direct member of the project.
The workaround is to check that the group or user has been invited to the project.
CODEOWNERS not updated when user or group names changeWhen a user or group change their names, the CODEOWNERS isn't automatically updated with the new names.
To enter the new names, you must edit the file.
Organizations using SAML SSO can set usernames to prevent users from changing their usernames.
The Code Owners feature requires direct group memberships to projects. When Global group memberships locks are enabled, they prevent groups from being invited as direct members to projects. This creates an incompatibility between the two features.
When the Global SAML or LDAP group memberships lock is enabled, you can't use groups or subgroups as Code Owners.
If you enabled either Global SAML or LDAP group memberships lock, you have the following options:
Support for inherited group members is proposed in issue 288851.