Artifact Dependencies copy and cleanup

If a dependency hasn't changed will the server push the artifact depencies to the agent ?

I know there is a "clean artifacts" tick box but i am unsure if the server sends the artifacts to the agents every time (even if there is no changes)

I have agents that are in another country to the server so the download artifacts takes a long time.

0
13 comments
Avatar
Permanently deleted user

Did you manage to find the answer to this question? It is of great interest to me, too.

Thanks!

0
Avatar
Permanently deleted user

Unfortunately no....

0

Hello Morne,

TeamCity uses artifact dependencies caches on agent. So in most cases, agent will not re-download same artifact from server. I advise you to use latest stable TeamCity release (7.0.3 at the moment) as it contains some relevant bugfixes.

"Clean Artifacts" checkbox does not affect artifact dependencies cache, it only affects artifacts destination directories.

0
Avatar
Permanently deleted user

I am using 7.0.3

I have never seen this happening (a local cached item used) , the server allways copies the files over.

How does this cache dependency works ?

My problem is that i have a server in Germany and an agent in Canada and it takes ages to copy the artifacts over.

Since TC doesn't support agent artifacts storage yet i have been trying to figure out if i can improve things.

0

Basically, agent shall cache artifacts by source url.

Could you please enable agent debug logging (intructions here: http://confluence.jetbrains.net/display/TCD7/Viewing+Build+Agent+Logs ) and reproduce the problem? (e.g., run build wiht same dependencies two times in a row on your Canadian build agent).

After that, please attach teamcity-agent.log file here

Also, you can watch/vote for this issue: http://youtrack.jetbrains.com/issue/TW-15448

0
Avatar
Permanently deleted user

Hello and thanks for the reply!

Is the artifact dependency caching also available in version 6.5?

0
Avatar
Permanently deleted user

how is this source URL generated ?

Does it use any build numbering fields ?

0

You an find more information about build artifacts urls here: http://confluence.jetbrains.net/display/TCD7/Patterns+For+Accessing+Build+Artifacts

Present implementation of artifact dependencies cache uses BUILD_ID

0

This feature was released in 6.5

0
Avatar
Permanently deleted user

Here's an extract from the build log (on the build page):

[17:08:20]: Checkout directory: /home/test/TeamCityAgent/work/d6ba5e0319cf5b8
[17:08:20]: Resolving artifact dependencies (1m:38s)
[17:09:59]: [Resolving artifact dependencies] 24 files retrieved for [build.zip!/bin/linux-x86-glibc22/release/] downloading pattern



I have turned on debug logging and have noticed the following lines in the log, which has no other references to caching and basically contains the same information:

[2012-06-13 17:08:20,827]   INFO -    jetbrains.buildServer.AGENT - Resolving artifact dependencies...
[2012-06-13 17:08:20,848]  DEBUG - r.artifacts.impl.HttpDiskCache - Http cache hit [http://teamcity/httpAuth/repository/download/bt2/127148.tcbuildid/teamcity-ivy.xml]
[2012-06-13 17:08:20,986]  DEBUG -    jetbrains.buildServer.AGENT - Downloading build.zip from <build :: all-with-archive (build with id: 127148)> to: /home/test/TeamCityAgent/work/d6ba5e0319cf5b8/bin/build.zip

... 1m38s later ...

[2012-06-13 17:09:07,651]  DEBUG - r.artifacts.impl.HttpDiskCache - Http cache hit [http://teamcity/httpAuth/repository/download/bt2/127148.tcbuildid/build.zip]
[2012-06-13 17:09:59,677]   INFO -    jetbrains.buildServer.AGENT - 24 files retrieved for [build.zip!/bin/linux-x86-glibc22/release/] downloading pattern



Several runs of the same configuration yield similar times (~1m40s) for artifact resolving.

The build.zip archive has some 550MB, and the unpacking takes some 3 seconds on the test machine. So, the other 1m35s are definitely spent downloading the artifact.

I DO NOT have the "Clean directory before downloading artifacts" option checked.

What else should I look for in the log?
0

Bram, thanks for the logs.

I have filed an issue: http://youtrack.jetbrains.com/issue/TW-22001

Please, watch/vote for it.

0
Avatar
Permanently deleted user

Thank you!

One last question: will there be a fix for version 6.5?

0

Bram,

Currently, we do not plan to release more updates for 6.5.

I advise you to upgrade to 7.0.4 that will be released very soon (days). It will contain the fix

0

Please sign in to leave a comment.