This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
15 Replies Last post: Jul 22, 2011 11:56 PM by Bill Smith  
John Lalande Newbie 23 posts since
Aug 2, 2006
Currently Being Moderated

Jun 30, 2011 9:14 PM

TC 6.5.1 not detecting ClearCase checkins consistently

I am attempting to implement TeamCity on our new build server after using CruiseControl.NET for several years.  Since we are migrating from SVN to ClearCase (I am shaking my head, too), TC looked like it might be easier to configure for ClearCase than editing XML files.

 

Most of my msbuild scripts migrate over with little change, however I am not getting consistent results from the trigger.  Builds just aren't always triggered when there is a checkin.

 

Yesterday, there was a checkin of four files and a build was triggered.  Over night, there were 40 files checked in without a build being triggered.

 

If I add a file, a build gets triggered.  If I make a change to a file I have added, a build gets triggered.

 

Are there any thoughts on this?

 

John

Michael Kuzmin JetBrains 1,549 posts since
Jul 30, 2005
Currently Being Moderated
Jul 1, 2011 2:42 PM in response to: John Lalande
Re: TC 6.5.1 not detecting ClearCase checkins consistently

Hi John

 

Technically TeamCity makes two separate actions

  1. The server continuously monitors VCS for changes, and displays new commits in UI like
    Capture.PNG
  2. new builds are started by configured trigger rules

After performing commits, do you see registered pending chages in TeamCity?

Could you also post teamcity-server.log and teamcity-vcs.log, from a period of time when new changes were committed but a build didn't start.

 

Thanks

Maxim Manuylov JetBrains 166 posts since
Apr 1, 2008
Currently Being Moderated
Jul 4, 2011 4:54 PM in response to: John Lalande
Re: TC 6.5.1 not detecting ClearCase checkins consistently

John,

 

Can you please enable debug logging and provide me full teamcity-clearcase.log file(s) if the issue occurs again?

Maxim Manuylov JetBrains 166 posts since
Apr 1, 2008
Currently Being Moderated
Jul 6, 2011 1:33 PM in response to: John Lalande
Re: TC 6.5.1 not detecting ClearCase checkins consistently

John,

 

In Administration UI you should go to Server Configuration -> Diagnostics and choose "debug-ClearCase" logging preset.

 

And if you want to edit log configuration manually you need only "teamcity-server-log4j.xml" file to be changed:

1. Change "<priority value="INFO"/>" to "<priority value="DEBUG"/>" in ClearCase category.

2. Add "<param name="maxBackupIndex" value="20"/>" line to ClearCase appender.

Maxim Manuylov JetBrains 166 posts since
Apr 1, 2008
Currently Being Moderated
Jul 19, 2011 4:12 PM in response to: John Lalande
Re: TC 6.5.1 not detecting ClearCase checkins consistently

John,

 

According to the log, the directory "C:\work\UCA_Client_5_0_devint\uca\uca_client\Client\CoreLibrary\NewHeights.PIM\Sources\OutlookEx" has the following version tree:

 

 

C:\work\UCA_Client_5_0_devint\uca\uca_client\Client\CoreLibrary\NewHeights.PIM\Sources\OutlookEx@@\main

C:\work\UCA_Client_5_0_devint\uca\uca_client\Client\CoreLibrary\NewHeights.PIM\Sources\OutlookEx@@\main\0

C:\work\UCA_Client_5_0_devint\uca\uca_client\Client\CoreLibrary\NewHeights.PIM\Sources\OutlookEx@@\main\UCA_Client_int

C:\work\UCA_Client_5_0_devint\uca\uca_client\Client\CoreLibrary\NewHeights.PIM\Sources\OutlookEx@@\main\UCA_Client_int\0

C:\work\UCA_Client_5_0_devint\uca\uca_client\Client\CoreLibrary\NewHeights.PIM\Sources\OutlookEx@@\main\UCA_Client_int\1 (UCA_Client_5.0_import)

 

And according to your config spec, the version "\main\0" is used in your view. But this version of the directory has empty content, so the file "Tools.cs" was added in the branch "UCA_Client_int", but this branch is not visible in your view due to config spec.
So this change actually does not correspond to the specified view - that is why TeamCity does not detect it.
Maxim Manuylov JetBrains 166 posts since
Apr 1, 2008
Currently Being Moderated
Jul 11, 2011 1:39 PM in response to: John Lalande
Re: TC 6.5.1 not detecting ClearCase checkins consistently

It is quite strange. What version of "C:\work\UCA_Client_5_0_devint\uca\uca_client\Client\CoreLibrary\NewHeights.PIM\Sources\OutlookEx" do you see in the view?

Maxim Manuylov JetBrains 166 posts since
Apr 1, 2008
Currently Being Moderated
Jul 19, 2011 4:11 PM in response to: John Lalande
Re: TC 6.5.1 not detecting ClearCase checkins consistently

Config spec for the view you specified in TeamCity settings is:

 

...

element "[55497388efef11de8ae3001e6857dfbe=\uca]/uca_client/..." .../UCA_Client_5_0_devint/LATEST

element "[55497388efef11de8ae3001e6857dfbe=\uca]/uca_client/..." UCA_Client_5.0-20110617 -mkbranch UCA_Client_5_0_devint

element "[55497388efef11de8ae3001e6857dfbe=\uca]/uca_client/..." /main/0 -mkbranch UCA_Client_5_0_devint

...

 

And since "C:\work\UCA_Client_5_0_devint\uca\uca_client\Client\CoreLibrary\NewHeights.PIM\Sources\OutlookEx" has neither "UCA_Client_5_0_devint" branch nor "UCA_Client_5.0-20110617" label the version "/main/0" must be used. Are you sure you specified in TeamCity setting the same view you use in ClearCase Explorer?

Bill Smith Novice 99 posts since
Jul 27, 2010
Currently Being Moderated
Jul 22, 2011 11:04 PM in response to: John Lalande
Re: TC 6.5.1 not detecting ClearCase checkins consistently

John, out of curiosity, are you using ClearCase UCM or are you using base ClearCase? ClearCase UCM uses streams/projects and manages the config spec automatically.

 

We've had lots of trouble with TC not detecting checkins consistently.  I'm about to setup a prototype instance to debug this better and work with JetBrains to get the issue resolved.


What I found is that whenever a developer do a long delivery with lots of files (30-40?), it doesn't detect all of them.   My thread can be found at: http://devnet.jetbrains.net/thread/291035?tstart=0

Bill Smith Novice 99 posts since
Jul 27, 2010
Currently Being Moderated
Jul 22, 2011 11:56 PM in response to: John Lalande
Re: TC 6.5.1 not detecting ClearCase checkins consistently

In our environment, we have TeamCity monitoring the integration stream.  Developers have private streams and they deliver their changes to the integration stream.  The way ClearCase works when you deliver your changes, it checks the files out in the integration view.  Then the integration stream doesn't see the changes until you complete the delivery.  When you complete the delivery, it checks all of the files in at that time which can take some time if you have a lot of files and triggers are involved.

 

If I recall correctly, TeamCity uses "clt lshistory -since ...." to detect checkins. I think it runs the command periodically with a different timestamp.  The problem is that if your delivery takes 10 minutes, it doesn't detect all of the files because they have a check-in timestamp that is the same for all files.

 

Let's say that there are 200 files in your delivery and it takes 10 minutes to complete (rate of 20 checkins per minute).  You start completing the delivery at 1:00pm so that at 1:01pm, 20 files have been checked in, at 1:02 pm, 20 more files have been checked in, etc.

 

So TeamCity runs the command "clt lshistory -since 12:55pm ..." at 1:00pm, it will see that  somewhere between 0-20/40 files have changed (depends on how long lshistory takes to run).  Let's say that it runs again at 1:05pm with "clt lshistory -since 1:00pm", it will see that ~100 files have changed.  Then it runs again at 1:10pm with "clt lshistory -since 1:05pm". It'll see that zero files have chagned.  The other ~100 files won't get detected because it will have a checkin time of 1:00pm even though they were really checked in between 1:05-1:10pm.  That's the way ClearCase UCM deliveries work.

 

I did have several TeamCity instances running on different machines, monitoring the same stream. They would all detect different number of files depending on when they did the checking.

More Like This

  • Retrieving data ...