Build status and actual results are not the same

When we run our tc builds we have all builds status are success (even if the build actually failed):

but if we go to specific build log we will get an error:

How can we sync the build result and build status

 

0
3 comments

Hi! Apparently, the build was failed by a Failure Condition. TeamCity would set the build status to "FAILURE" in such a case. However, it seems that something has changed the status. One could do it by sending a Service Message like the one below from a build step:

echo "##teamcity[buildStatus status='SUCCESS' text='Success']"

 Another way it could  be done is by marking the build as successful in UI or via REST API, but it doesn't seem to be your case because changing a build status of a finished build through UI or REST API requires a comment which would be visible in build history.

To undo the status change, you can update the build status in UI (click three dots next to a finished build in the history > Mark as failed...) or script it with REST API. Here's a curl example:

curl -u username:password "http://teamcity:8111/app/rest/builds/id:123456/status" --request POST --header "Content-Type: application/json" --data '{"status":"FAILURE","comment":"changed status via REST API"}'

To prevent the status change to "SUCCESS" in the first place, please review the build to make sure it doesn't issue a Service Message that would change the build status. Feel free to attach a full build log (go to the Build Log page > Download log > select Full build log or Zip), and I will have a look into it.

0
This is log for such build. As you can see it finished with status NORMAL 'Success', but at the end we have failure
 
Build 'UltimateOdds / Flutter_iOS' #59, default branch 'refs/heads/master'
Triggered 2022-09-18 14:38:28 by 'Git'
Started 2022-09-18 14:39:02 on agent 'MacMini-2'
Finished 2022-09-18 14:39:35 with status NORMAL 'Success'
VCS revisions: 'HttpsGitLipsarStudioDPolushinSample' (Git, instance id 317): '5beebfbd3d464a00fd5f3fc7a26a24efa393103e' (branch: 'refs/heads/master')
               'UltimateOdds_HttpsGitLipsarStudioAlUltOddsFlutterApp' (Git, instance id 308): '21bd46a02eaba2c7a1dd918a84e3c8331a7c8117' (branch: 'refs/heads/master')
TeamCity server version is 2021.1.4 (build 92954), server timezone: GMT (UTC)
 
[14:38:28]E: bt312 (1m:06s)
[14:38:28]i: TeamCity server version is 2021.1.4 (build 92954)
[14:38:59] : The build is removed from the queue to be prepared for the start
[14:38:59] : Collecting changes in 2 VCS roots
[14:38:59] : [Collecting changes in 2 VCS roots] VCS Root details
[14:38:59] : [VCS Root details] "https://git.lipsar.studio/AL-UltOdds/FlutterApp" {instance id=308, parent internal id=217, parent id=UltimateOdds_HttpsGitLipsarStudioAlUltOddsFlutterApp, description: "https://git.lipsar.studio/AL-UltOdds/FlutterApp.git#refs/heads/master"}
[14:38:59] : [VCS Root details] "https://git.lipsar.studio/d.polushin/Sample" {instance id=317, parent internal id=222, parent id=HttpsGitLipsarStudioDPolushinSample, description: "https://git.lipsar.studio/d.polushin/Sample.git#refs/heads/master"}
[14:38:59]i: [Collecting changes in 2 VCS roots] Detecting changes in VCS root 'https://git.lipsar.studio/AL-UltOdds/FlutterApp' (used in 'Flutter_Android', 'Flutter_iOS')
[14:38:59]i: [Collecting changes in 2 VCS roots] Will collect changes for 'https://git.lipsar.studio/AL-UltOdds/FlutterApp' starting from revision 21bd46a02eaba2c7a1dd918a84e3c8331a7c8117
[14:38:59]i: [Collecting changes in 2 VCS roots] Detecting changes in VCS root 'https://git.lipsar.studio/d.polushin/Sample' (used in 'Fastin_flutter_iOS', 'Flutter iOS' and 5 other configurations)
[14:38:59]i: [Collecting changes in 2 VCS roots] Will collect changes for 'https://git.lipsar.studio/d.polushin/Sample' starting from revision 5beebfbd3d464a00fd5f3fc7a26a24efa393103e
[14:38:59] : [Collecting changes in 2 VCS roots] Compute revision for 'https://git.lipsar.studio/AL-UltOdds/FlutterApp'
[14:38:59] : [Compute revision for 'https://git.lipsar.studio/AL-UltOdds/FlutterApp'] Upper limit revision: 21bd46a02eaba2c7a1dd918a84e3c8331a7c8117
[14:38:59]i: [Compute revision for 'https://git.lipsar.studio/AL-UltOdds/FlutterApp'] MaxModId = 35034
[14:38:59] : [Compute revision for 'https://git.lipsar.studio/AL-UltOdds/FlutterApp'] The first revision that was detected in the branch refs/heads/master: 4fb53e04c3e131642c84164a17158c062399ca5c
[14:38:59] : [Compute revision for 'https://git.lipsar.studio/AL-UltOdds/FlutterApp'] The first revision that was detected in the branch refs/heads/master after the last change of the VCS root or checkout rules: 4fb53e04c3e131642c84164a17158c062399ca5c
[14:38:59] : [Compute revision for 'https://git.lipsar.studio/AL-UltOdds/FlutterApp'] Latest commit attached to build configuration (with id <= 35034): 21bd46a02eaba2c7a1dd918a84e3c8331a7c8117
[14:38:59] : [Compute revision for 'https://git.lipsar.studio/AL-UltOdds/FlutterApp'] Computed revision: 21bd46a02eaba2c7a1dd918a84e3c8331a7c8117
[14:38:59] : [Collecting changes in 2 VCS roots] Compute revision for 'https://git.lipsar.studio/d.polushin/Sample'
[14:38:59] : [Compute revision for 'https://git.lipsar.studio/d.polushin/Sample'] Upper limit revision: 5beebfbd3d464a00fd5f3fc7a26a24efa393103e
[14:38:59]i: [Compute revision for 'https://git.lipsar.studio/d.polushin/Sample'] MaxModId = 35034
[14:38:59] : [Compute revision for 'https://git.lipsar.studio/d.polushin/Sample'] The first revision that was detected in the branch refs/heads/master: 5beebfbd3d464a00fd5f3fc7a26a24efa393103e
[14:38:59] : [Compute revision for 'https://git.lipsar.studio/d.polushin/Sample'] Cannot find modification with revision 5beebfbd3d464a00fd5f3fc7a26a24efa393103e, perhaps this revision is too old?
[14:38:59] : [Compute revision for 'https://git.lipsar.studio/d.polushin/Sample'] Computed revision: 5beebfbd3d464a00fd5f3fc7a26a24efa393103e
[14:38:59] : Starting the build on the agent "MacMini-2"
[14:39:02]i: Agent time zone: Europe/Moscow
[14:39:02]i: Agent is running under JRE: 11.0.8+10
[14:39:02] : Updating tools for build
[14:39:02] : [Updating tools for build] Tools are not required for the build
[14:39:02] : Clearing temporary directory: /Users/ricardo/buildAgentAlong/temp/buildTmp
[14:39:02] : Publishing internal artifacts
[14:39:02] : [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[14:39:02] : [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[14:39:02] : Using vcs information from agent file: bd2ec11771a47000.xml
[14:39:02] : Checkout directory: /Users/ricardo/buildAgentAlong/work/bd2ec11771a47000
[14:39:02] : Updating sources: auto checkout (on server) (5s)
[14:39:02] : [Updating sources] Will use server side checkout: Agent checkout is not possible for vcs root 'https://git.lipsar.studio/d.polushin/Sample'. Details: Cannot checkout VCS root 'https://git.lipsar.studio/d.polushin/Sample' into the same directory as VCS root 'https://git.lipsar.studio/AL-UltOdds/FlutterApp'
[14:39:02] : [Updating sources] Building incremental patch for VCS root: https://git.lipsar.studio/d.polushin/Sample; checkout rules: =>; revision: 5beebfbd3d464a00fd5f3fc7a26a24efa393103e --> 5beebfbd3d464a00fd5f3fc7a26a24efa393103e
[14:39:02] : [Updating sources] Building incremental patch for VCS root: https://git.lipsar.studio/AL-UltOdds/FlutterApp; checkout rules: =>; revision: 791293f0d68c128d6bf73442700a7db3badd6682 --> 21bd46a02eaba2c7a1dd918a84e3c8331a7c8117
[14:39:07] : [Updating sources] Repository sources transferred (5.9 KB)
[14:39:07] : [Updating sources] Updating /Users/ricardo/buildAgentAlong/work/bd2ec11771a47000
[14:39:07] : Build preparation done
[14:39:07] : Step 1/4: Flutter Update (Command Line) (10s)
[14:39:07]i: [Step 1/4] Content of /Users/ricardo/buildAgentAlong/temp/agentTmp/custom_script10209513045529262923 file: 
export PATH="$PATH:/Users/kirill/dev/flutter/bin"
export PATH="$PATH:/Users/ricardo/flutter/bin"
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export PUB_HOSTED_URL="https://pub.flutter-io.cn"
export FLUTTER_STORAGE_BASE_URL="https://storage.flutter-io.cn"
 
flutter clean
flutter pub get
 
[14:39:07] : [Step 1/4] Starting: /Users/ricardo/buildAgentAlong/temp/agentTmp/custom_script10209513045529262923
[14:39:07] : [Step 1/4] in directory: /Users/ricardo/buildAgentAlong/work/bd2ec11771a47000
[14:39:11] : [Step 1/4] Cleaning Xcode workspace...                                         3.2s
[14:39:11] : [Step 1/4] Deleting build...                                                    8ms
[14:39:11] : [Step 1/4] Deleting .dart_tool...                                              21ms
[14:39:11] : [Step 1/4] Deleting Generated.xcconfig...                                       0ms
[14:39:11] : [Step 1/4] Deleting flutter_export_environment.sh...                            0ms
[14:39:11] : [Step 1/4] Deleting Flutter.podspec...                                          0ms
[14:39:11] : [Step 1/4] Deleting .flutter-plugins-dependencies...                            0ms
[14:39:11] : [Step 1/4] Deleting .flutter-plugins...                                         0ms
[14:39:13] : [Step 1/4] Running "flutter pub get" in bd2ec11771a47000...                 1,321ms
[14:39:18] : [Step 1/4] Process exited with code 0
[14:39:18]E: Step 2/4: Pod Install (Command Line) (17s)
[14:39:18]i: [Step 2/4] Content of /Users/ricardo/buildAgentAlong/temp/agentTmp/custom_script5509893824882000933 file: 
cd ios
pod install --repo-update
 
[14:39:18] : [Step 2/4] Starting: /Users/ricardo/buildAgentAlong/temp/agentTmp/custom_script5509893824882000933
[14:39:18] : [Step 2/4] in directory: /Users/ricardo/buildAgentAlong/work/bd2ec11771a47000
[14:39:19] : [Step 2/4] Updating local specs repositories
[14:39:29] : [Step 2/4] [!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/all_pods_versions_1_1_4.txt Response: 530 <!DOCTYPE html>
[14:39:29] : [Step 2/4] <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
[14:39:29] : [Step 2/4] <!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
[14:39:29] : [Step 2/4] <!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
[14:39:29] : [Step 2/4] <!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
[14:39:29] : [Step 2/4] <head>
[14:39:29] : [Step 2/4] <title>Origin DNS error | cdn.cocoapods.org | Cloudflare</title>
[14:39:29] : [Step 2/4] <meta charset="UTF-8" />
[14:39:29] : [Step 2/4] <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
[14:39:29] : [Step 2/4] <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
[14:39:29] : [Step 2/4] <meta name="robots" content="noindex, nofollow" />
[14:39:29] : [Step 2/4] <meta name="viewport" content="width=device-width,initial-scale=1" />
[14:39:29] : [Step 2/4] <link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/main.css" />
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4] <script>
[14:39:29] : [Step 2/4] (function(){if(document.addEventListener&&window.XMLHttpRequest&&JSON&&JSON.stringify){var e=function(a){var c=document.getElementById("error-feedback-survey"),d=document.getElementById("error-feedback-success"),b=new XMLHttpRequest;a={event:"feedback clicked",properties:{errorCode:1016,helpful:a,version:1}};b.open("POST","https://sparrow.cloudflare.com/api/v1/event");b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Sparrow-Source-Key","c771f0e4b54944bebf4261d44bd79a1e");
[14:39:29] : [Step 2/4] b.send(JSON.stringify(a));c.classList.add("feedback-hidden");d.classList.remove("feedback-hidden")};document.addEventListener("DOMContentLoaded",function(){var a=document.getElementById("error-feedback"),c=document.getElementById("feedback-button-yes"),d=document.getElementById("feedback-button-no");"classList"in a&&(a.classList.remove("feedback-hidden"),c.addEventListener("click",function(){e(!0)}),d.addEventListener("click",function(){e(!1)}))})}})();
[14:39:29] : [Step 2/4] </script>
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4] <script defer src="https://performance.radar.cloudflare.com/beacon.js"></script>
[14:39:29] : [Step 2/4] </head>
[14:39:29] : [Step 2/4] <body>
[14:39:29] : [Step 2/4]   <div id="cf-wrapper">
[14:39:29] : [Step 2/4]     <div class="cf-alert cf-alert-error cf-cookie-error hidden" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
[14:39:29] : [Step 2/4]     <div id="cf-error-details" class="p-0">
[14:39:29] : [Step 2/4]       <header class="mx-auto pt-10 lg:pt-6 lg:px-8 w-240 lg:w-full mb-15 antialiased">
[14:39:29] : [Step 2/4]          <h1 class="inline-block md:block mr-2 md:mb-2 font-light text-60 md:text-3xl text-black-dark leading-tight">
[14:39:29] : [Step 2/4]            <span data-translate="error">Error</span>
[14:39:29] : [Step 2/4]            <span>1016</span>
[14:39:29] : [Step 2/4]          </h1>
[14:39:29] : [Step 2/4]          <span class="inline-block md:block heading-ray-id font-mono text-15 lg:text-sm lg:leading-relaxed">Ray ID: 74cad4989b151628 &bull;</span>
[14:39:29] : [Step 2/4]          <span class="inline-block md:block heading-ray-id font-mono text-15 lg:text-sm lg:leading-relaxed">2022-09-18 14:39:29 UTC</span>
[14:39:29] : [Step 2/4]         <h2 class="text-gray-600 leading-1.3 text-3xl lg:text-2xl font-light">Origin DNS error</h2>
[14:39:29] : [Step 2/4]       </header>
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4]       <section class="w-240 lg:w-full mx-auto mb-8 lg:px-8">
[14:39:29] : [Step 2/4]           <div id="what-happened-section" class="w-1/2 md:w-full">
[14:39:29] : [Step 2/4]             <h2 class="text-3xl leading-tight font-normal mb-4 text-black-dark antialiased" data-translate="what_happened">What happened?</h2>
[14:39:29] : [Step 2/4]             <p>You've requested a page on a website (cdn.cocoapods.org) that is on the <a data-orig-proto="https" data-orig-ref="www.cloudflare.com/5xx-error-landing/" target="_blank">Cloudflare</a> network. Cloudflare is currently unable to resolve your requested domain (cdn.cocoapods.org).
[14:39:29] : [Step 2/4]             
[14:39:29] : [Step 2/4]           </div>
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4]           
[14:39:29] : [Step 2/4]           <div id="resolution-copy-section" class="w-1/2 mt-6 text-15 leading-normal">
[14:39:29] : [Step 2/4]             <h2 class="text-3xl leading-tight font-normal mb-4 text-black-dark antialiased" data-translate="what_can_i_do">What can I do?</h2>
[14:39:29] : [Step 2/4]             <p><strong>If you are a visitor of this website:</strong><br />Please try again in a few minutes.</p><p><strong>If you are the owner of this website:</strong><br />Check your DNS settings. If you are using a CNAME origin record, make sure it is valid and resolvable. <a rel="noopener noreferrer" href="https://support.cloudflare.com/hc/en-us/articles/234979888-Error-1016-Origin-DNS-error">Additional troubleshooting information here.</a></p>
[14:39:29] : [Step 2/4]           </div>
[14:39:29] : [Step 2/4]           
[14:39:29] : [Step 2/4]       </section>
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4]       <div class="feedback-hidden py-8 text-center" id="error-feedback">
[14:39:29] : [Step 2/4]     <div id="error-feedback-survey" class="footer-line-wrapper">
[14:39:29] : [Step 2/4]         Was this page helpful?
[14:39:29] : [Step 2/4]         <button class="border border-solid bg-white cf-button cursor-pointer ml-4 px-4 py-2 rounded" id="feedback-button-yes" type="button">Yes</button>
[14:39:29] : [Step 2/4]         <button class="border border-solid bg-white cf-button cursor-pointer ml-4 px-4 py-2 rounded" id="feedback-button-no" type="button">No</button>
[14:39:29] : [Step 2/4]     </div>
[14:39:29] : [Step 2/4]     <div class="feedback-success feedback-hidden" id="error-feedback-success">
[14:39:29] : [Step 2/4]         Thank you for your feedback!
[14:39:29] : [Step 2/4]     </div>
[14:39:29] : [Step 2/4] </div>
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4]       <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">
[14:39:29] : [Step 2/4]   <p class="text-13">
[14:39:29] : [Step 2/4]     <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">74cad4989b151628</strong></span>
[14:39:29] : [Step 2/4]     <span class="cf-footer-separator sm:hidden">&bull;</span>
[14:39:29] : [Step 2/4]     <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block sm:mb-1">
[14:39:29] : [Step 2/4]       Your IP:
[14:39:29] : [Step 2/4]       <button type="button" id="cf-footer-ip-reveal" class="cf-footer-ip-reveal-btn">Click to reveal</button>
[14:39:29] : [Step 2/4]       <span class="hidden" id="cf-footer-ip">217.25.236.182</span>
[14:39:29] : [Step 2/4]       <span class="cf-footer-separator sm:hidden">&bull;</span>
[14:39:29] : [Step 2/4]     </span>
[14:39:29] : [Step 2/4]     <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; security by</span> <a rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" target="_blank">Cloudflare</a></span>
[14:39:29] : [Step 2/4]     
[14:39:29] : [Step 2/4]   </p>
[14:39:29] : [Step 2/4]   <script>(function(){function d(){var b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>
[14:39:29] : [Step 2/4] </div><!-- /.error-footer -->
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4]     </div><!-- /#cf-error-details -->
[14:39:29] : [Step 2/4]   </div><!-- /#cf-wrapper -->
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4]   <script>
[14:39:29] : [Step 2/4]   window._cf_translation = {};
[14:39:29] : [Step 2/4]   
[14:39:29] : [Step 2/4]   
[14:39:29] : [Step 2/4] </script>
[14:39:29] : [Step 2/4] 
[14:39:29] : [Step 2/4] </body>
[14:39:29] : [Step 2/4] </html>
[14:39:29] : [Step 2/4] 
[14:39:29]W: [Step 2/4] Process exited with code 1
[14:39:29]E: [Step 2/4] Unexpected error occurred during build message processing in TeamCity, please contact your system administrator
[14:39:29]E: [Step 2/4] Step Pod Install (Command Line) failed
[14:39:29]E: [Step 2/4] Unexpected error occurred during build message processing in TeamCity, please contact your system administrator
[14:39:29] : [Step 2/4] Publishing internal artifacts
[14:39:29] : [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[14:39:29] : [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[14:39:35]E: Build failure condition: Failed
[14:39:35]E: Build failure condition cause message: Process exited with code 1
[14:39:35] : Build finished
0

Hi D27192001. Sorry about the delay. If the issue is still occurring, we will need to see the details below. Feel to upload them via https://uploads.jetbrains.com/ and post your upload ID.

  1. Full build log. To obtain it, go to the Build Log page > Download log > select Full build log or Zip. That way, we get more verbosity than shown in the web UI by default;
  2. teamcity-agent.log* files covering the entire duration of the build. Default log location: <Agent home directory>/logs;
  3. teamcity-server.log* files covering the entire duration of the build. Default log location: <TeamCity home directory>/logs.

In the meantime, you might be able to work around the issue by restarting the server.

0

Please sign in to leave a comment.