TeamCity 5.0 EAP - Remote Run issue with VS 2008 and TFS

I started a remote run with the "Commit" option unselected as I was trying to see if my personal changes where picked up correctly

The personal build executed on the server reporting a build failure (expected, as I checked in an non compilable change). Remote Run works!

I then tried a different scenario so I undid the braking change and started a new personal build on the server. The server reported the same build failure as before, this is not expected because I rolled back my local changes on my machine.

I then tried to run a build on the server to see if the code that was uploaded on the server for my remote run would be discarded, however the build failed as before, in other terms the 'public' build on the server is trying to compile the build with my personal uncommitted (and undone/rolled back) changes.

Running the build again with "Enforce clean checkout" has fixed the build issue but I would not expect a public build launched from the browser to pick up my uncommitted changes.

Is there a better way to undo the uncommitted personal changes on the server?

Thanks,
Alex

8 comments
Comment actions Permalink

Do you run rebuild on the server builds? What build runner was it? Please attach the build log of the personal change.
Do you use TFS checkout on agent?

Thanks!

0
Comment actions Permalink

We have the same issue and we've been getting this as long as we've been using TeamCity (4.0 and later).  We are currently using 4.5.4.  Of late this has been driving us nuts though as the frequency of our check-ins have increased a lot and we need this to be solved ASAP as it seriously hampers our productivity with constantly having to Enforce Clean Checkouts to get the builds running through.   The workflow is basically the same.  Somebody does a personal build that fails.  Somebody else then checks in which starts a build and the build fails with the changes of the previous personal build that failed.  The only way to get it working is to do a Clean checkout on the build agent and then force another build.  As mentioned this seriously hampers our productivity.

Some other information:

  1. Using 4.5.4
  2. Checkout mode: Automatically on server
  3. Build Runner: MSBuild for .NET 3.5


Please get this fixed ASAP.

0
Comment actions Permalink

.... also experiencing this incredibly frustrating "feature" - ETA on a fix??

0
Comment actions Permalink

I'm wondering whether this will work better if we use the Checkout on Agent functionality?  Surely it will be easier for TeamCity to then undo the changes as all it would have to do is to do a Undo Pending Changes on the workspace created on the build agent?

0
Comment actions Permalink

Do you use 'Rebuild' target for building your project? I mean does the build checks files timestamps before rebuilding a project?

Carel, could you please attach a personal build log that made next build failed. All I need is the beginning part where all personal changes are recordeed and the last part where all personal changes are logged again.

Does the build make files readonly?

Thanks!

0
Comment actions Permalink

Personal builds with TFS checkout on agent will not work for TC 4.5, please use TFS checkout on server. The issue is fixed for TC 5.0 EAP (we plan to release it this year).

In general, TFS checkout on agent may work faster if you have many agents with clean checkouts for every build.

0
Comment actions Permalink

No, we are using incremental builds to speed up the compile process. Is it a requirement to use Rebuild?  I've now changed the builds to do a Rebuild and will monitor to see whether this prevents the problem from occuring.  In case it still fails, I will attach a log file as requested.  The build does not make any files ReadOnly either.

Thanks

0
Comment actions Permalink

Personal change is applied by the following method:
- remember original file and timestamp
- update file with personal change
- run the build
- revent file to the original state and timestamp

So, let file F.cs has timestamp t1
Starting personal build movet it timestamp to t2 > t1. All timestamp based checks will require rebuild. But after build has finished the reverted file timestamp would be t1 (< t2) again, thus nothing to be build.

TeamCity provides an environment variable called 'BUILD_IS_PERSONAL'. This environment variable is set only if the build is personal.

You may get the list of all changed files for the build from msbuild property called $(teamcity_build_changedFiles_file)

For details on those properties, please see the documentation page at:
http://www.jetbrains.net/confluence/display/TCD4/Predefined+Properties

Please have a look to the related issue
http://www.jetbrains.net/tracker/issue/TW-7954
Feel free to watch/vote/have a look to it.

Thanks!

0

Please sign in to leave a comment.