Forks are not listed in the upstream repository's "Forks" page because they have not been indexed on the Search server
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When a new repository is created as a fork of an existing repository, the new repo will be listed in the "Forks" page of the parent (also known as "upstream") repo.
However, if the new fork has not been indexed on the Search server (Elasticsearch or OpenSearch) for any reason (for example: if there are issues related to indexing), the fork will not be listed in the upstream's "Forks" page.
Diagnosis
The first step is check if there are any issues on the search server.
Please refer to Troubleshooting steps for Bitbucket Server Code Search for procedures for diagnosing possible search server issues.
Case 1
One possible scenario where new repos are not getting indexed is when the search server has set itself to "read-only" mode because it detected that it is running low on disk space.
Please see Elasticsearch reports HTTP status 403 in bitbucket logs for further info.
The next step would be to analyze the requests made from the Bitbucket UI through the following procedures:
- Generate a HAR file while loading the "Forks" page of the upstream repo
- Check the browser's Console logs for any error messages
In the HAR file, look for the
/rest/search/latest/projects/<PROJECT_KEY>/repos/<REPO_SLUG>/forks
endpoint and check whether the JSON response returns the expected forks or not
Cause
Forks are not displayed if they have not been indexed on the search server.
Case 1
For this case, the fork was not indexed because the search server has set itself to "read-only" mode due to low disk space.
Resolution
Case 1
Please follow the resolution procedures mentioned in: Elasticsearch reports HTTP status 403 in bitbucket logs.