What determines a failing build?

I have several builds that claim to be "Failing" but then go on to become "Success". How does TeamCity determine that a build is "failing"? I have searched all documentation and forums for this but could find no answer...

My build shows in "Important Messages" some output from ant that perhaps it thinks is indication of impending failure, like

: svn (<1s)
: sequential (<1s)
: if (<1s)
: exec (<1s)
: svn: URL '20080707130501UTC' does not exist
: Result: 1

but this is not critical for the build (indeed the build goes on to have result "Success"). Can I control how TeamCity determines a "failing" build?

Thanks,
Graeme.

15 comments

This is one thing about TC that I thought was kind of amusing. As near as I can tell, there are some warnings (: Note: Some input files use unchecked or unsafe operations.) that cause this sort of behavior.

As far as I know, the four options on the "General settings" page are the only control that you get (in 3.1.1 anyway):

Fail build if:

  • build process exit code is not zero

  • at least one test failed

  • an error message is logged by build runner

  • it runs longer than _____ minutes


Donald

0

Hello Graeme,

I think you should disable option "an error message is logged by build runner" on the General Settings page for build configuration.

Hope this helps,
KIR

0

This is a problem I have encountered periodically - yesterday in fact.

I reported a specific instance of this problem: http://www.jetbrains.net:8888/tracker/issue/TW-4555.

The build reports that it "will fail" even when the build is successful. By default, this generates email to the developer(s) who checked in changes to this build. Yesterday a developer came to me asking why they received "will fail" email when a change that they checked in could not have broken the build. The cause was a warning caused by a copy ant task that could not find a file:
This is all that is in the important messages log for the build that generated the "willfail" email:
: copy (<1s)
: Warning: Could not find file C:\path\to\file\File.properties to copy.

BTW, the Build fail if option "an error message is logged by build runner" is unchecked as it is in all my build configs.

-Dave

0

Hello Dave,

Did I understand you correctly:

- you've disabled "an error message is logged by build runner" for the build configuration
- there was a error while copying a file during the build
- final build status was normal
- during the build, a developer got notification that the very build will fail?

If all of the above is true, this looks like a serious problem and I'd like to get more details on it,
like full build log, build logs from server and from agent. You can send them to me directly.

Kind regards,
KIR

0

Yes, Kir. That is what is happening. Basically, when the TC log file has a warning that an ant ]]> task is unsuccessful, it generates a "failing" email to whoever did the check-in even though "an error message is logged by build runner" is disabled for this build config. The build is successful despite the warning in the log file and the email. I will send you logs directly via email.

-Dave

Edited by: Dave Leskovac on Jul 18, 2008 5:03 PM

0

Hi,

I seem to have a similar problem, we have a build that seems to complete successfully but on some build agents it continually fails. It consistently fails on the same ones and consistently succeeds on 1 agent, but the log looks the same.

There is a warning about a missing file from ant - but the build finishes ok:

Project built succesfully.
: Process exit code: 0

The warning is present in both failing and succeeding builds:

import (running for 1h:35m:47s)[12:53:54]: import (<1s)[12:53:54]: import (<1s)[12:53:54]: import (<1s)[12:53:54]: import (<1s)[12:53:54]: import (<1s)[12:53:54]: import (<1s)[12:53:54]: javac (<1s)[12:53:54]: javac_macro (<1s)[12:53:54]: sequential (<1s)[12:53:54]: echo (<1s)[12:53:54]: Java version for compilation is 1.6[12:53:54]: mkdir (<1s)[12:53:54]: Created dir: C:\TeamCityBuildAgent\work\6710e7d266c3432\build_support\build\src[12:53:54]: mkdir (<1s)[12:53:54]: Created dir: C:\TeamCityBuildAgent\work\6710e7d266c3432\build_support\build\classes[12:53:54]: if (<1s)[12:53:54]: copy (<1s)[12:53:54]: Copying 7 files to C:\TeamCityBuildAgent\work\6710e7d266c3432\build_support\build\src[12:53:54]: copy (<1s)[12:53:54]: Warning: C:\TeamCityBuildAgent\work\6710e7d266c3432\build_support\conf not found.

(sorry about the formatting, but thats what you get from a copy/paste from the TC all messages page...)

Thanks in advance for any ideas.
Chris

0

Chris, please try 3.1.2 - the problem should be fixed in this build.

0

Hi Kirill,

I tried 3.1.2, but the build still fails on some machines. The agent is definitely showing as being a build 6878 agent and I also did a clean of sources, to make sure.

I guess its a different problem. Any thoughts and/or information I can send in?

Regards,
Chris

0

Chris, what are the settings for "Fail build if" section for the build configuration?
Can you spot any difference between logs of failed and successful builds?

Regards,
KIR

0

Hi,

We only have Fail build if : "build process exit code is not zero ".

The logs both look pretty much the same (and almost identical sizes) - attached is the log from the failed build, which ends like this:

: Created dir: C:\TeamCityBuildAgent\work\6710e7d266c3432\neobonds\build\junit-report
: unset.globals
: delete
: Deleting: C:\TeamCityBuildAgent\work\6710e7d266c3432\neobonds\tmp.project.properties
: success
: echo
: Project built succesfully.
: all
: Process exit code: 0
: Publishing artifacts
: Paths to publish:
: Publishing artifacts 'neobonds/build' to root artifacts directory
: Build finished

Regards,
Chris

Edited by: Chris Kimpton on Aug 8, 2008 9:47 AM



Attachment(s):
Eurobonds_Neobonds-DEV_DEV-35.log
0

Hi Chris,

What is the result test status of the failed build? Failed?
Could you take a look at the logs at buildAgent/logs/teamcity-agent.log on build agent
and TeamCity/logs/teamcity-server.log on the server-side? Are there any exceptions for the build?

Could you please enable debug information as described at
http://www.jetbrains.net/confluence/display/TCD3/Reporting+Issues
and attach the logs to the message or send them to teamcity feedback e-mail address
(see the contact link at the bottom of teamcity server).

Kind regards,
KIR

0

Hi Kir,

The result of the build is "compilation failed"

Attached are the agent and server logs - the build ran at 14:35-14:56.

The only exceptions I see are in the agent log about being unable to ping the agent (i presume an error from the server).

No obvious exceptions on the server.

Regards,
Chris



Attachment(s):
teamcity-server.zip
teamcity-agent.zip
0

I used to get this "failing" messages, but then I disabled one of the notification options and it stopped. I do not remember exact name of the option, but it has something like "send me notification of FIRST ERROR". I disabled it for both e-mail and IDEA notifications. One of my ANT copy tasks was "failing", but it had failonerror="false". TC sent e-mail every time it executed that task, but the build goes on and I get another e-mail - build successful.

- Vadim.

0

Hi Chris,

I've filed the bug at http://jetbrains.net/tracker/issue/TW-5557, please watch it.
Could you please also attach a full build log for successful run of the same build to this issue?

Kind regards,
KIR

0

Please sign in to leave a comment.