TFS Repository Update Leak

I seems when you updates you repositories to a new location, it still keep hitting on old locations. Can we have a fix for this as it keep hitting the server for many unused URL every 180 seconds.

Below is the log

2014-01-06 16:23:50,168 WARN [4-BAM::PlanExec:pool-7-thread-4] [TfsRepository] Caught an exception: 
com.microsoft.tfs.core.exceptions.TECoreException: TF10122: The path '$/Portfolio Implementation/Versions/${prod.version.major}/${prod.version}/Pretrade' contains a '$' at the beginning of a path component. Remove the '$' and try again.
                at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:99)
                at com.microsoft.tfs.core.exceptions.mappers.VersionControlExceptionMapper.map(VersionControlExceptionMapper.java:48)
                at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.queryHistory(WebServiceLayer.java:1661)
                at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayerLocalWorkspaces.queryHistory(WebServiceLayerLocalWorkspaces.java:1358)
                at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.queryHistory(VersionControlClient.java:4578)
                at com.stellarity.bamboo.repository.TfsRepository.collectChangesSinceLastBuild(TfsRepository.java:169)
                at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:466)
                at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:331)
                at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:259)
                at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:154)
                at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildIfTriggered(DefaultChangeDetectionManager.java:116)
                at com.atlassian.bamboo.v2.trigger.ChangeDetectionListenerAction.testIfBuildShouldStart(ChangeDetectionListenerAction.java:111)
                at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$3.call(PlanExecutionManagerImpl.java:461)
                at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$3.call(PlanExecutionManagerImpl.java:446)
                at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312)
                at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:78)
                at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:715)
                at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.startConditionalBuild(PlanExecutionManagerImpl.java:445)
                at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.start(PlanExecutionManagerImpl.java:514)
                at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.start(PlanExecutionManagerImpl.java:531)
                at com.atlassian.bamboo.plan.NonBlockingPlanExecutionServiceImpl$3.call(NonBlockingPlanExecutionServiceImpl.java:131)
                at com.atlassian.bamboo.plan.NonBlockingPlanExecutionServiceImpl$3.call(NonBlockingPlanExecutionServiceImpl.java:119)
                at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
                at java.util.concurrent.FutureTask.run(Unknown Source)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52)
                at java.lang.Thread.run(Unknown Source)
Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.SOAPFault: TF10122: The path '$/Portfolio Implementation/Versions/${prod.version.major}/${prod.version}/Pretrade' contains a '$' at the beginning of a path component. Remove the '$' and try again.
                at com.microsoft.tfs.core.ws.runtime.client.SOAP12Service.examineResponseDOMForFault(SOAP12Service.java:132)
                at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineBodyForFault(SOAPService.java:1105)
                at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:732)
                at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)
                at ms.tfs.versioncontrol.clientservices._03._RepositorySoap12Service.queryHistory(_RepositorySoap12Service.java:1502)
                at com.microsoft.tfs.core.clients.versioncontrol.internal.WebServiceLayer.queryHistory(WebServiceLayer.java:1645)
                ... 25 more

5 answers

Hi Gaurav,

Are you sure you have updated all repos? Could you recheck it.

Here is how you can reproduce the issue :

1.) Set up a plan with TFS repository URL say URL1 (could be junk/temporary/typo) polling every 180 seconds

2.) Edit your plan and modify the repo URL to say URL2

Check the TFS Repository Log it will still be polling URL1.

Gaurav, I cannot reproduce the issue using these steps. Could you change the addon log level to ALL and see which plan uses the wrong path (on the admin page select system->log settings->com.stellarity.bamboo.repository.TfsRepository->ALL->save)? And then take a look at the plan's repo (and update its settings).

Yeah I understand what you are talking. There is no such URL in any current plans.

It was there before. Something went wrong and it did not replace the URL but appended it.

On a side note : Is bamboo.repository.branch.name global variable getting populated ?

No. In TFS a branch name is a part of the source path. And currently there is no automatic branch detection in TFS Repository so this variable is not set. Are you interested in this feature?

We would like to have that feature. The simpler our configuration become the better it is.

We adopted to code promotion branching strategy and have bamboo projects for Development, Integration and Production, each having more than dozens of plans.

When we build we want to know which branch code is checked out ( out of dev, int, prod ) to add in artifact name or manifest. Right now we are achiving this by passing a Sytem variable to gradle build for each plans. But then it is lot of copy paste.

In TFS, we have something similar 
Project
    Development
    Integration
    Production

I see. I'll implement setting ${bamboo.repository.branch.name} variable in the next release (will be ready on the next week).

Implemented in version 1.1.2 and 1.0.11. Please, try it.

Sure. Will let you know.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,821 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you