Skip to content

Duo Code Review sometimes fails silently due to SAML SSO

Context

Reported initially in https://gitlab.com/gitlab-com/request-for-help/-/issues/2489.

Could be related to #519883 (closed).

Description

Sometimes, after assigning @GitLabDuo to review an MR, nothing happens.

Investigation

In the logs (https://log.gprd.gitlab.net/app/r/s/ET5IX), we see an undefined method `project' for nil:NilClass error. More details in https://gitlab.com/gitlab-com/request-for-help/-/issues/2489#note_2391959111.

We might have a issue with the serialization when queueing the job. It wouldn't queue a job if the merge_request was nil in the first place as it would've failed before it reaches https://gitlab.com/gitlab-org/gitlab/-/blob/11d4d0f8242ce8071e638f7d970b3b96b2595237/ee/app/services/ee/merge_requests/base_service.rb#L68

Examples

Edited by François Rosé