Clean VCS Checkout Conditions in TeamCity

Hi guys,

We use Perforce on our project and configured it in TeamCity. As our project grows larger the build time is now taking longer, and each time when TeamCity performs a clean VCS checkout on build agents, it would further prolong the build time.

So far we've identified one condition which can cause this, which is when we modify the perforce client mapping of build agents. We noticed that this also happens at seemingtly random times as well, but we have already changed the system property: system.teamcity.build.checkoutDir.expireHours to 'never'.

I'm just wondering what are the other conditions in TeamCity that could cause clean VCS checkout and if we can disable it or control it somehow?

With Kind Regards,
Yong

3 comments
Comment actions Permalink

TC does clean checkout in the following cases:
1) the checkout directory on agent is missing (please note that even if you set expire timeout to never, it can be deleted, if there's not enough space for another build)
2) VCS settings have been changed (including checkout rules)
3) Clean checkout was requested
4) History build (manually requested build against old sources)

0
Comment actions Permalink

Hello,

I have an issue with cleanup and cannot find any option to regulate this behavior.

I constantly notice full cleaning with the message:

Will perform clean checkout. Reason: VCS settings have been changed

 

But this did not happen. The release branch settings have not changed for a long time. The last mentioning of this VCS in the audit:

03 Jun 18 23:12   (git) 370_GitHub VCS root settings were edited (view change) '370_GitHub' VCS root was updated

And I see build at 21 Sep 18 11:44 with cleanup  and this, mentioned above, reason.

What could be the cause of this and how can this be circumvented?
Unsolicited cleanup adds 2 hours to the build. It is sad.

My server version 2017.2.4 (build 51228)

Many thanks in advance.

 

0
Comment actions Permalink

Hi Kekal,

 

While the audit shows no changes, if the VCS Root has parametrized options and those change, that will also be trigger that message. If that's not the case at all, I'd suggest opening an issue in our tracker indicating all the details, as we might be incorrectly detecting VCS settings. At the very least, if nothing has changed, we should report the proper error.

0

Please sign in to leave a comment.