Skip to content

When forking a repo, if the user has a large number of namespaces a 503 graphql error can occur

Summary

When forking a repo, if the user has a large number of namespaces a 503 graphql error can occur when the user opens the dropdown of possible namespaces they can use.

Steps to reproduce

  1. As a user with 200+ namespaces(groups)
  2. try to fork a repo
  3. Click dropdown to select a namespace

What is the current bug behavior?

Error on page, 503 from graphql:

POST https://gitlab.com/api/graphql --> 503

Query:
[{"operationName":"searchForkableNamespaces","variables":{"projectPath":"gitlab-qa-sandbox-group-5/qa-test-2022-09-01-12-08-00-94c4067c5023e6cf/project-with-code-38184c7e4f949f76","search":"gitlab-qa-user1"},"query":"query searchForkableNamespaces($projectPath: ID!, $search: String) {\n  project(fullPath: $projectPath) {\n    id\n    forkTargets(search: $search) {\n      nodes {\n        id\n        fullPath\n        name\n        visibility\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}\n"}]

Response:
{"errors":[{"message":"Request timed out. Please try a less complex query or a smaller set of records."}]}

What is the expected correct behavior?

Drop down displays namespaces


This issue was picked up by the automated E2E tests, details below:

Full description

Create Merge request creation from fork can merge feature branch fork to mainline

File path

./qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb

Stack trace

QA::Support::Repeater::WaitExceededError: Wait failed after 60 seconds

First happened in https://ops.gitlab.net/gitlab-org/quality/canary/-/jobs/7888285.

Related test case: https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347818.

Screenshot image
Edited by Jay McCure