We have started getting problems with builds being queued for quite some time (often >10min) even if there are no other builds running. After some debugging I found that it is the following hg command that Bamboo is waiting for to finish:
"C:\Program Files\TortoiseHg\hg.exe" update --clean --rev 1dddd1e554321eddae471623062d4824a0744dbf
This command is running in: C:\Users\Administrator\bamboo-home\xml-data\build-dir\serverSide\DEG-API1-559\mergeWorkspace\
Before this command ran this hg-repo was cloned from the repo-cache. In other words, it looks like it is creating a new clone every time a build is being executed. The hg-repo is about 1 GB in size so I understand why updating to the newest revision in a newly cloned repo takes some time.
However, I don't understand why it has to clone the repo from scratch everytime. Is there any setting that would make Bamboo avoid this? It feels like it would be a lot faster if it could reuse one hg-repo for the plan and then just update it with the latest changes. Why is a new hg-repo needed for every build?
The command above was generated when a I ran a branch of the plan. Don't know if that matters. We are running Bamboo 5.0.
I believe you're using Bamboo built-in branch merging strategy (called in Bamboo as "Gatekeeper" or "Branch updater"). Because of that every build that is being executed must be first 'validated' whether it can merge cleanly with the _default_ branch. This is done on the Bamboo server and the process you see in the DEG-API1-559\mergeWorkspace directory, the "(...)hg.exe update --clean --rev <hash>" one, is the manifestation of that pre-build procedure.
I believe that for avoiding concurrency issues the above merge is executed in separate directory (separate for each build that is being run). When the merge finishes successfully (or fails), that separate directory is trashed to reclaim disk space on the Bamboo server.
I don't think there is some configuration available in the Bamboo that would allow you to re-use Hg repository for the pre build merge process. Of course you could turn off the "Gatekeeper/B-updater" completely and avoid the problem, but I understand that this isn't the cure.
Maybe you should raise a feature/improvement request on the https://jira.atlassian.com/browse/BAMtracker? That way your particular case would be more visible to the Bamboo project team and to the customers (who might put their votes on your issue and lobby for it too)?
Am I helpful?
Thanks for you response! You are correct. We are using the Gatekeeper feature. Sure, I can post a feature request. In addition to slowing down our builds the space reclaim process seems a bit buggy. I found lots of old directories that hadn't been reclaimed. I removed them manually but I wish I wouldn't have to do that.
Another week, another Topic Tuesday! Agile has been on my mind a lot lately because I've seen good implementations and bad implementations, but now as a Jira admin it matters more to me whether...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events