[ 
https://issues.apache.org/jira/browse/IGNITE-10071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16706935#comment-16706935
 ] 

ASF GitHub Bot commented on IGNITE-10071:
-----------------------------------------

SomeFire commented on a change in pull request #86: IGNITE-10071 Queued and 
running builds hang in the TC bot
URL: https://github.com/apache/ignite-teamcity-bot/pull/86#discussion_r238206934
 
 

 ##########
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/ProactiveFatBuildSync.java
 ##########
 @@ -239,16 +256,32 @@ public void invokeLaterFindMissingByBuildRef(String 
srvName, ITeamcityConn conn)
      */
     @Nullable
     public FatBuildCompacted loadBuild(ITeamcityConn conn, int buildId,
-                                       @Nullable FatBuildCompacted 
existingBuild,
-                                       SyncMode mode) {
+        @Nullable FatBuildCompacted existingBuild,
+        SyncMode mode) {
         if (existingBuild != null && !existingBuild.isOutdatedEntityVersion()) 
{
-            boolean finished = !existingBuild.isRunning(compactor) && 
!existingBuild.isQueued(compactor);
+            boolean finished =
+                existingBuild.state(compactor) != null // don't count old fake 
builds as finished
+                    && !existingBuild.isRunning(compactor)
+                    && !existingBuild.isQueued(compactor);
 
             if (finished || mode != SyncMode.RELOAD_QUEUED)
                 return null;
         }
 
-        return reloadBuild(conn, buildId, existingBuild);
+        FatBuildCompacted savedVer = reloadBuild(conn, buildId, existingBuild);
+
+        BuildRefCompacted refCompacted = new BuildRefCompacted(savedVer);
+        if (savedVer.isFakeStub())
+            refCompacted.setId(buildId); //to provide possiblity to save the 
build
+
+        final String srvNme = conn.serverId();
 
 Review comment:
   `srvNme` -> `srvName`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [TC Bot] Background upload of a build and simultaneous bot restart may result 
> in a queued build persisted but actually build is finished
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-10071
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10071
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Dmitriy Pavlov
>            Assignee: Dmitriy Pavlov
>            Priority: Critical
>
> TC bot new persistence based on continuous uploading builds from the TC 
> server may become outdated during bot server restart.
> E.g. Run all which became completed in TC Bot's base may include 
> queued/running builds, which may lead to missed test failures (As running 
> build may not have these failures).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to