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:
[hidden email]
With regards,
Apache Git Services