Where is TeamCity getting those files from TFS?

Setup: TFS in on server A. TeamCity server and agent is on server B.

TFS has the following project/folder hierarchy (it is actually far more involved) but for "simplicity", lets leave it at this:

ProjectA
  Folder (etc)
  Folder (etc)

ProjectB
  Folder_1
  Folder_2
  Folder_3
    Folder_3A
          Folder_3A1
              File_1.cmd
              File_2.cmd
              File_3.cmd
          Folder_3A2
          Folder_3A3
          Folder_3A4
      Folder_3B (etc)
      Folder_3C (etc)
      Folder_3D (etc)
  Folder_4

ProjectC
  Folder (etc)
  Folder (etc)

Now on TeamCity side, I've setup a build to pull files from TFS -> ProjectB -> Folder_3 and run a cmd which is File_2.cmd

The "Root" directory on TeamCity side is "$/ProjectB/Folder_3"

And here is what I get (note: TeamCity server had absolutely no files in the desination directory):

c:\ProjectB\Folder_3\Folder3A\Folder3A1\
                        File_1.cmd
                        File_2.cmd
                        File_3.cmd
                        File_4.cmd
                        File_5.cmd
                        File_6.cmd
                        File_7.cmd

As you can see File_1, File_2, File_3 - are expected because they are in TFS
but
File_4, File_5, File_6, and File_7 - where did those come from if they are not in TFS in Folder_3A1?

Is there a log to see where TeamCity is getting files from? Or why would it get "some" files not related to Root directory?
How do I diagnose and correct this issue?

0
16 comments

What version of TFS Server/Server Explorer do you use?

Yes there are log. Please start TFS-NATIVE-*.exe process with the following cmd-line:

tfs-native.exe /log http://:]]> result.xml BuildPatch $/ProjectB/Folder_3 0 c c:\temp\tfs-run

Please attach result.xml and build output of the process.

TFS-NATIVE-*.exe can be found in TeamCity's temp folder.

Thanks!

0
Avatar
Permanently deleted user

TFS Server and Explorer version: 8.0.50727.147
TFS Server is "Full Standard Edition"

Results of TC-TFS-NATIVE-*.exe
  (looks like its looking for a webservice "ServerStatus.asmx" that does not exist). result.xml was not created. May be an argument to the exe is missing? Or?

C:\TeamCity\temp>TC-TFS-NATIVE-1224106187991.exe /log http://localhost:81 result.xml BuildPatch $/ProjectB/Folder_3 0 c c:\temp\tfs-run
DEBUG fs.Program - Tfs-native started with
TFS Native Verifier v0.0 Copyright (C) 2006-2008 JetBrains s.r.o.
INFO fs.Program - Use Tfs from JetBrains.TeamCity.Tfs.Tfs8Accessor
TFS Native Accessor v0.0 Copyright (C) 2006-2008 JetBrains s.r.o.
INFO fs.Program - Connecting to server http://localhost:81
Build Patch:
  Server='http://localhost:81'
  Root='$/ProjectB/Folder_3'
  FromVersion='0'
  CurrentVersion='c'
ERROR fs.Program - System.Net.WebException: The request failed with HTTP status 404: //Services/v1.0/ServerStatus.asmx.
  at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
  at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
  at Microsoft.TeamFoundation.Client.CheckAuthenticationProxy.CheckAuthentication()
  at Microsoft.TeamFoundation.Client.TeamFoundationServer.Authenticate(Boolean useProvider, ICredentialsProvider provider)
  at Microsoft.TeamFoundation.Client.TeamFoundationServer.Authenticate()
  at JetBrains.TeamCity.Tfs.Command.Do()
  at JetBrains.TeamCity.Tfs.Program.Main(String[] args)
System.Net.WebException: The request failed with HTTP status 404: //Services/v1.0/ServerStatus.asmx.
  at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
  at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
  at Microsoft.TeamFoundation.Client.CheckAuthenticationProxy.CheckAuthentication()
  at Microsoft.TeamFoundation.Client.TeamFoundationServer.Authenticate(Boolean useProvider, ICredentialsProvider provider)
  at Microsoft.TeamFoundation.Client.TeamFoundationServer.Authenticate()
  at JetBrains.TeamCity.Tfs.Command.Do()
  at JetBrains.TeamCity.Tfs.Program.Main(String[] args)

C:\TeamCity\temp>

0

This tool uses Microsoft's assemblies to access TFS Server.
Please make sure http://localhost:81 is the right TFS Server address. That address should be the same as the address you used to configure VCS root in TeamCity.

Thanks!

0
Avatar
Permanently deleted user

Sorry, I misunderstood the requirement. localhost is TeamCity server.
After I changed to the right server the tool ran fine.

I do have logs now.

However, after additional thought I decided to create new branch from the target "suspect" branch and start over using that. It worked. So it appears that TeamCity got confused with original branch due to the fact that most likely it was renamed several times and branched from other branches, etc, etc. Basically it is a very messy branch.
Looks like the issue is gone now and I don't have extra files floating around.

It is however a concern that TeamCity got confused where VS.NET Team Explorer is not and is able to process things correctly.

Sounds like this is something you guys might want to look into for future fixes. Or use a different set of Microsoft assemblies to get to TFS.

Spasiba! ;)

Issue resolved.

0

Please send me the logs to teamcity-feedback [] jetbrains.com
Thanks!

0
Avatar
Permanently deleted user

Eugene,
Sorry for not replying sooner.  Priorities have changed a bit but now I'm back to evaluating TeamCity, with Enterprise license, I might add.

The issue described here came back and we really do have concerns about reliability of TeamCity to get source from TFS.
I sent logs to teamcity-feedback@jetbrains.com yesterday.

Please review at your earliest convenience.

Thanks.

0

Hello Vik,

   Unfortunately, Eugene (and most of JetBrains team) won't be available until Monday.
   He'll answer you next week.

   Regards,
   KIR

0
Avatar
Permanently deleted user

All right Kirill, thanks.
Next week it is.

0

Vik,
Have you tried the latest version of TeamCity? 4.0.1 EAP?
I recieved your logs, thank you. I'll analyze them and answer you.
Thanks!

0
Avatar
Permanently deleted user

Hi Eugene,
Thanks for timely response to my email and forum post.
I did vote/watch on IssueTracker under "HappyUser" user.  Could not register under Vik for some reason.  You are welcome to go in and change "HappyUser" to "Vik" if possible.

I have not tried 4.0.1 yet.  Do you think this particular issue is resolved there or should I still wait for a patch from you?

If I was to try 4.0.1, would I need to get an update to Enterprise Evaluation licence that I have now or simply upgrade and enterprise license will still be valid?
I would rather not change the environment if you are pretty sure the issue is not resolved there and I would rather wait for a patch from you.  Hopefully it will not take very long time to resolve.

Would you have an ETA for a patch please?  Not looking for exact time.  A few days, a week, a few weeks, a month?  Ballpark figure.

Please advice.

0

What TC version to you use now? If it is prior to 4.0, I would recommend you upgrading to 4.0.1. It will continue to work with your enterprise evaluation license.
I plan to create a patch for you in a 3 weeks, because forthcomming New Year and Christmas.
Thanks!

0
Avatar
Permanently deleted user

Thanks much!
I'll wait for a patch.  Please let me know when its available.
Meanwhile I'll look into upgrading TC to version 4 or higher.

0
Avatar
Permanently deleted user

Eugene, do you have a new ETA on the patch?
Thanks!

0
I've implemented TFS support on agent side using TFS workspaces.
Could you please try the patch from issue
http://jetbrains.net/tracker/issue/TW-6471
0
Avatar
Permanently deleted user

Didn't wok.  Something is missing.  Posted in (TW-6508).

0
Avatar
Permanently deleted user

Eugene, I'm not sure if you get notifications if I add comment to (TW-6508).
If you do, then I'll just post there only, to keep track in one place.  If not, I'll post here too.

Anyways, posted in (TW-6508).  Please take a look.

0

Please sign in to leave a comment.