Parallel build log Follow
I was just watching a nant build as teamcity shows it going right down the targets and tasks and back up, and down and up, and .....
I was wondering if TeamCity had support for displaying the log in the same way but having multiple threads in the build runner reporting back progress.
Please sign in to leave a comment.
Right now TeamCity build log is not suitable to show messages from several threads. I.e. if such messages occur, build log hierarchy may become broken. We have plans to improve showing of build log for the case when parallel tasks are executed. Note that this is the problem of showing only, internally TeamCity can process parallel messages.
When you say "internally TeamCity can process parallel messages", does this mean that the build runner API can specify a job number/name and messages are correlated accordingly? Obviously, service messages cannot work in parallel because there is no way to know where the console output should go.
The documentation (http://www.jetbrains.net/confluence/display/TCD4/Build+Runner+Plugin) has a dead link to jetbrains.buildServer.agent.BuildProgressLogger as the logger.
I am looking at the BuildLog class (http://javadoc.jetbrains.net/teamcity/openapi/current/jetbrains/buildServer/serverSide/buildLog/BuildLog.html), is the flowStarted/flowFinished methods the ones for capturing jobs/threads?
Is there any example code or live code that shows how parallel threads can be captured?
There is special attribute called flowId. This attribute can be added to any service message. Flow id can be considered as thread identifier, i.e. each parallel process during a build should generate messages with unique flow id. This way TeamCity will understand to which test the output belongs.
As for broken link, you are right, it seems some part of javadoc was not generated, will fix. Thank you!
Cool. So is the current hierarchy in the NAnt log created using nested logging blocks, and not flows (or even nested flows)?
Internally build log hierarchy respects flow ids, but build log with messages from parallel processes can't be easily shown in the UI. In the future we probably add a way to show messages from the selected parallel process, however right now all messages are shown without per flow grouping.
I logged an enhancement (http://jetbrains.net/tracker/issue2/TW-8249) because I couldn't find another task for this.
Thanks for your help with how TC currently works, it is much appreciated.