After upgrading to TFS cloud, Bamboo plans are failing

Issue #78 resolved
Jamie Prather created an issue

On code checkout, bamboo plans are failing with the following error:

02-Oct-2019 14:50:21    Caused by: com.microsoft.tfs.core.clients.versioncontrol.exceptions.MultipleWorkspacesFoundException: Multiple workspaces found matching workspace name 'Bamboo_FTW-JA11-FJJ_<id>_<server>' and owner name 'ENT\<id>'. Please specify one of the following workspace specs:
02-Oct-2019 14:50:21    [Bamboo_FTW-JA11-FJJ_<id>_<server>;ENT\<id>, Bamboo_FTW-JA11-FJJ_<id>_<server>;<guid>]

The strangest part is that the workspace names do not exist in TFS, and the ID being referenced has no workspaces.

We have cleared the TFS cache on our remote agents. We also tried clearing the Bamboo workspaces in TFS. After that, the test plan worked correctly only once, and then started failing again.

We are currently on Bamboo 6.5.0 and this plugin did work fine before we upgraded TFS. We are now running Azure DevOps Server 2019.

Comments (11)

  1. Sergey Podobry

    Hi Jamie,

    Try deleting the whole %USERPROFILE%\AppData\Local\Microsoft\Team Foundation folder. Also could you post the exception stacktrace? It may help to troubleshoot the issue.

  2. Jamie Prather reporter

    After clearing the folder, the first plan that ran worked successfully. However, once another plan runs, they all start failing with the same error, even though it only relates to one of the project. It seems that the projects are all interfering with one another.

    Here is the new error. In this example, the ID only belongs to one specific project, but every project using a TFS checkout receives this error.

    error   02-Oct-2019 16:02:30    Error occurred while running Task '(1)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout.
    error   02-Oct-2019 16:02:30    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: java.lang.IllegalArgumentException: Owners must be the same: <domain>\<id> vs. <guid>
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:141)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:99)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:207)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:123)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:285)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:224)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:285)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:92)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:81)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:203)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:175)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:122)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:117)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
    error   02-Oct-2019 16:02:30        at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
    error   02-Oct-2019 16:02:30        at java.lang.Thread.run(Thread.java:748)
    

  3. Sergey Podobry

    Jamie, here is the test version that should not be so strict about workspace owner changes. Please try it. Note that you need to uninstall your current version first.

  4. Jamie Prather reporter

    Hi Sergey,

    We had a working session on this this afternoon and were able to get around the issue.

    Whenever we got an error with the workspace owner, we went to find which project was using that ID. In most cases, they were using the old TFS URL (the one that was used prior to upgrading). So, we fixed their URL and then deleted all entries with that ID in the VersionControl.config file. After going through that process for a couple of errors, we were able to get plans working again.

    It does seem that this issue can come up again, just as soon as another plan runs with the wrong URL, but at least we have a workaround at this point.

  5. Log in to comment