How to determine if there are multiple Git repository configurations in Bamboo that point to the same remote repository using different URLs
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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
This article aims to help you determine whether you have multiple Git repository configurations in Bamboo that point to the same remote repository using different URLs.
This is especially important if the remote repository is larger than 2.0 GB. Bamboo considers these configurations as separate repositories for cache management due to the multiple URLs. If plans associated with these configurations are triggered at the same time, this may lead to delays in builds entering the queue, as Bamboo is still updating or rebuilding the cache for the large repository. This delay can impact all builds, not just those linked to the large repository.
The recommended approach is to have one repository cache folder for each remote repository. Therefore, you should avoid creating multiple repository configurations in Bamboo that point to a single large repository (> 2.0 GB) with different URLs.
Environment
The solution has been validated in Bamboo Data Center 9.6.6 but may be applicable to other versions.
Diagnosis
Here’s how you can determine if you have multiple repository configurations pointing to the same remote repository using different URLs:
Go to the Bamboo administration > Overview > Build resources > Repository settings page.
Ensure that the Manage caches tab is selected.
Search for the name of your large repository on that page using the web browser's search functionality. Don’t search for the entire repository URL, just the name of the repository. For example:
myrepo
https://github.com/user/myrepo.gitIf you get multiple matches, it is important to visually examine the complete repository URL to verify that they all refer to the same remote repository. The following are examples of unique URLs that will cause Bamboo to create separate cache folders for each, even if they all correspond to the exact same remote repository.:
Solution
Upon verifying that the matches on the Bamboo administration > Overview > Build resources > Repository settings page point to the same remote repository, we recommend designating one URL as the primary URL going forward. Once this is done, you can opt for one or more of the following suggestions:
Ensure that all plans pointing to your large repository are associated with the same repository configuration in Bamboo.
If having all plans linked to the same repository configuration in Bamboo is not possible due to factors like custom exclude/include rules, you can update the URL of the particular repository configuration to match the selected URL. It is okay to have multiple repository configurations pointing to the same repository as long as they have the same URLs. This means that all of them will share the same repository cache.
To access the repository configuration associated with a particular URL displayed in the Bamboo administration > Overview > Build resources > Repository settings page, simply click on the corresponding plans and navigate to the Repositories tab.