Continuous Integration Restore - Takes too long

David Forster asked on May 14, 2018 15:57

Can anyone shed any light on why the restore operation of ContinuousIntegration.exe seems to take an eternity to complete on our build server, but only a couple of minutes (or less) when run locally.

When we pull any CI changes from our repo locally "ContinuousIntegration.exe -r" only seems to be concerned with new or updated files and completes very promptly, depending on the number of updates.

However, when our TeamCity build does this, and we run the CI restore it does absolutely every single file in the CIRepository and takes on average about 20 mins.

How does Kentico keep track of what it needs to restore, based on previous operations ?

(Kentico 11)

Recent Answers

Michal Samuhel answered on May 15, 2018 12:43

CI should restore all objects only once on the first time. This should initialize helper table CI_Metadata. All other restores should check the checksums on files to prevent from you having to restore everything.

Could you compare sums for the objects between TC DB and your local DB? This could be one of the causes. Although if changes do go through multiple parent -> child objects or via other bindings, this requires these objects to be updated as well and it could impact overall speed. But, since it seems to work well on your local, my guess would be problem with that particular table.

0 votesVote for this answer Mark as a Correct answer

David Forster answered on May 15, 2018 13:50

Having checked the CI_FileMetaData tables on both local machine and target machine I can see that my local instance is populated, however the target instance is completely empty.

Could this be because CI is actually disabled on the target instance? This is by choice as we don't want to generate the files/changes on the target.. only on our local builds.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on May 15, 2018 18:12

I would also recommend considering applying latest hotfix. There were two bugs fixed in regards to CI.

0 votesVote for this answer Mark as a Correct answer

Michal Samuhel answered on May 16, 2018 09:17

Without having the table in place, all files will be restored. You could transfer the table content along but without going through the code, right now I can not say, whether it will be sufficient, or if we do not check settings as well while restoring. For the simplicity I would guess that we do not, but there could be other depending checks that could cause problems.

I do not know, how your build and deploy process works, but you could add an extra step where team city would just build the solution (with having CI enabled) and than push everything to QA or prod servers.

A bit more on deployment can be found on:

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.