Monorepo submodules not loading
Created by: christinelovett
- Sourcegraph version: 3.28.0
- Platform information: K8s on-prem
Steps to reproduce:
- User searches repo: ^main/trunk$
- User finds main/trunk in search results and clicks it
- User is taken to sourcegraph.app.redacted.com/main/trunk
- User sees top level folders and .gitmodules file loaded in the file navigation. User also sees full commit / branch history
- User tries to open one of the folders foo. User waits a few minutes and sees the
Error
loading file tree: Request to https://sourcegraph.app.customer.com/.api/graphql?TreeEntriies failed with 504 Gateway Time-out
message in the file nav
In addition, a user cannot search contents in the monorepo for the Code tab:
- User writes the query repo: ^main/trunk$ foo and presses search
- User instantly sees No Results in the Code tab
- User navigates to the Diffs tab, and the query runs for ~20 seconds and returns 1 accurate result. However, the query times out
- User navigates to the Commits tab, and the search returns results as expected
The .gitmodule file for the monorepo looks like:
[submodule "<subdir1>/<subdir2>/<submodule>"]
path = <subdir1>/<subdir2>/<submodule>
url = ../../<project>/<subdir1>.d/<subdir2>.d/<submodule>-git
for a given submodule. These submodules have different numbers of subdirs (it’s not always two like the example here). The .gitmodule file is ~50K LOC and takes a few minutes to load in Sourcegraph.