-
Bug
-
Resolution: Fixed
-
Medium
-
9.2.3, 10.0.0, 10.1.0, 9.2.20, 9.6.8, 10.0.3
-
None
-
Severity 3 - Minor
-
-
Warranty
Issue Summary
Git shallow checkouts not working from Bamboo 9.2.3 when both "Use shallow clones" and "Enable repository caching on agents" are enabled in the repository settings.
This is reproducible on Data Center:
Steps to Reproduce
- Use Bamboo 9.2.3 or later
- Create a repository
- Open the repository Advanced Options
- Notice "Enable repository caching on agents" will be already checked, keep it.
- Enable the "Use shallow clones" checkbox
- Save the repository settings
- Add the repository to a Plan and run a customised build with verbose logging
- Check the build logs
Expected Results
The build logs should report a checkout command such as:
/usr/bin/git fetch -f -p ssh://ffd98edf-cab0-47a4-bc2d-79b23e5134bb@127.0.0.1:39071/big/bigfiles.git +refs/heads/master:refs/heads/master --update-head-ok --progress --verbose --depth 1
Notice the --depth 1 as an option to the git fetch command.
Actual Results
The checkout test is executed without --depth 1:
/usr/bin/git fetch -f -p ssh://52957c39-a38c-4409-b399-d8140ed08029@127.0.0.1:45503/big/bigfiles.git +refs/heads/master:refs/heads/master --update-head-ok --progress --verbose
Workaround
Repository caching on Agents and Shallow clones are mutually exclusive, meaning that only one property will be enabled at a time. This is by design and was implemented in BAM-22132. To enable shallow clones, disable "Enable repository caching on agents."
[BAM-25956] Git repository shallow checkout option not working in Bamboo 9.2.3 and later
Remote Link | New: This issue links to "Page (Confluence)" [ 974663 ] |
Remote Link | New: This issue links to "Page (Confluence)" [ 972258 ] |
Fix Version/s | Original: 10.2.0 [ 110294 ] |
Remote Link |
New:
This issue links to "+core+ Dogfooding › Test Git Branch Detection › feature- |
Remote Link |
New:
This issue links to "ZZ Zuza › PR data › feature- |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Waiting for Release [ 12075 ] | New: Closed [ 6 ] |
Fix Version/s | New: 9.6.10 [ 110356 ] | |
Fix Version/s | New: 9.2.22 [ 110355 ] |
Fix Version/s | New: 10.1.1 [ 110338 ] | |
Fix Version/s | New: 10.2.0 [ 110294 ] |
Status | Original: In Review [ 10051 ] | New: Waiting for Release [ 12075 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10051 ] |