Intermittent failures when changing buildStatus to 'SUCCESS' using Service Message on TC 9.1.1

We have a script which, under certain circumstances, will change the status of a failing build back to 'SUCCESS' using the Service Message:

##teamcity[buildStatus status='SUCCESS' text='Success (script)']

as documented in https://confluence.jetbrains.com/display/TCD9/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingBuildStatus

This worked fine for several months on TeamCity 8.x, but since uprading to TeamCity 9.1.1 we are experiencing intermittent cases (approx 1 in 10) where the buildStatus remains 'failed' even after this line is output. The failures do not seem to be associated any particular build config or agent.

Is this a known issue with TC 9.1.1?
Does anyone know of a work-around?

Thanks,
Geoff

2 comments

Hi Geoff,

Could you please attach full build log of the build with the incorrect status?

0
Hi Alina,

We are outputting ##teamcity[buildStatus status='SUCCESS' text='Success (script)'] to reverse and earlier failure (the fact that it is in there three times is just to try to work around this problem). However as you can see from the attached screen-shot the build still shows as failed with the annotation "Success (script)".

Geoff

[13:33:09]Skip checking for changes - changes are already collected
[13:33:10]Clearing temporary directory: D:\temp\buildTmp
[13:33:10]Publishing internal artifacts
[13:33:10]Checkout directory: D:\work\1dd3d5f85bbc88f0
[13:33:10]Updating sources: agent side checkout (13m:03s)
[13:46:13]Resolving artifact dependencies (2s)
[13:46:16]Step 1/8: Build Script Runner (7m:26s)
[13:46:16][Step 1/8] Step 1/2: Run build script if present (Python) (7m:26s)
[13:46:16][Step 1/2] Starting: C:\Python27\python.exe .script.py
[13:46:16][Step 1/2] in directory: D:\work\1dd3d5f85bbc88f0
[13:46:16][Step 1/2] Calling ./build_scripts/run_ClientBinaries-Build-Windows-Debug32-bit.py for build id 4028127
[13:46:16][Step 1/2] Build Windows Binaries (7m:04s)
[13:53:21][Step 1/2] Generate Windows Debug Installer (20s)
[13:53:42][Step 1/2] ./build_scripts/run_ClientBinaries-Build-Windows-Debug32-bit.py PASSED
[13:53:42][Step 1/2] Process exited with code 1
[13:53:42][Step 1/2] Step Run build script if present (Python) failed
[13:53:42][Step 1/8] Step 2/2: Check build script result (Python)
[13:53:42][Step 2/2] Starting: C:\Python27\python.exe .script.py
[13:53:42][Step 2/2] in directory: D:\work\1dd3d5f85bbc88f0
[13:53:42][Step 2/2] Run script passed
[13:53:42][Step 2/2] ##teamcity[buildStatus status='SUCCESS' text='Success (script)']
[13:53:42][Step 2/2] Run script passed
[13:53:42][Step 2/2] ##teamcity[buildStatus status='SUCCESS' text='Success (script)']
[13:53:42][Step 2/2] Run script passed
[13:53:42][Step 2/2] ##teamcity[buildStatus status='SUCCESS' text='Success (script)']
[13:53:42][Step 2/2] Process exited with code 0
[13:53:42]Step 2/8: Delete build directory (Command Line)
[13:53:42][Step 2/8] Build step Delete build directory (Command Line) is skipped because the previous step has failed
[13:53:42]Step 3/8: Check for build directory (Command Line)
[13:53:42][Step 3/8] Build step Check for build directory (Command Line) is skipped because the previous step has failed
[13:53:42]Step 4/8: Versioning (Python)
[13:53:42][Step 4/8] Build step Versioning (Python) is skipped because the previous step has failed
[13:53:42]Step 5/8: Configure CMake (Python)
[13:53:42][Step 5/8] Build step Configure CMake (Python) is skipped because the previous step has failed
[13:53:42]Step 6/8: Visual Studio (sln)
[13:53:42][Step 6/8] Build step Visual Studio (sln) is skipped because the previous step has failed
[13:53:42]Step 7/8: Test runners (Command Line)
[13:53:42][Step 7/8] Build step Test runners (Command Line) is skipped because the previous step has failed
[13:53:42]Step 8/8: Upload PDB to symbol server (Command Line)
[13:53:42][Step 8/8] Build step Upload PDB to symbol server (Command Line) is skipped because the previous step has failed
[13:53:43]Publishing internal artifacts (5s)
[13:53:43]Publishing artifacts (1m:05s)
[13:54:50]Build finished


Attachment(s):
TC_failure.png
0

Please sign in to leave a comment.