ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpav...@apache.org
Subject [ignite-teamcity-bot] branch master updated: Failed to start flag support from XML
Date Sat, 10 Nov 2018 13:59:26 GMT
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git


The following commit(s) were added to refs/heads/master by this push:
     new 46b0bab  Failed to start flag support from XML
46b0bab is described below

commit 46b0bab01e976d97efb63d0265bbc8ff51c31a2a
Author: Dmitriy Pavlov <dpavlov@apache.org>
AuthorDate: Sat Nov 10 16:59:23 2018 +0300

    Failed to start flag support from XML
---
 .../org/apache/ignite/ci/tcmodel/hist/BuildRef.java |  8 +++++++-
 .../ignited/fatbuild/FatBuildCompacted.java         | 21 ++++++++++++++-------
 2 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/hist/BuildRef.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/hist/BuildRef.java
index ee9f7e6..5efc019 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/hist/BuildRef.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/hist/BuildRef.java
@@ -55,6 +55,8 @@ public class BuildRef extends AbstractRef {
 
     @XmlAttribute public Boolean composite;
 
+    @XmlAttribute public Boolean failedToStart;
+
     /** Build page URL. */
     @XmlAttribute public String webUrl;
 
@@ -69,7 +71,7 @@ public class BuildRef extends AbstractRef {
         return !hasUnknownStatus();
     }
 
-    private boolean hasUnknownStatus() {
+    public boolean hasUnknownStatus() {
         return STATUS_UNKNOWN.equals(status);
     }
 
@@ -111,6 +113,10 @@ public class BuildRef extends AbstractRef {
         return composite != null && composite;
     }
 
+    public boolean isFailedToStart() {
+        return failedToStart != null && failedToStart;
+    }
+
     /** {@inheritDoc} */
     @Override public boolean equals(Object o) {
         if (this == o) return true;
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/FatBuildCompacted.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/FatBuildCompacted.java
index b062a54..2426d92 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/FatBuildCompacted.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/FatBuildCompacted.java
@@ -129,13 +129,20 @@ public class FatBuildCompacted extends BuildRefCompacted implements
IVersionedEn
 
         AtomicBoolean failedToStart = new AtomicBoolean();
 
-        int[] arr = build.getSnapshotDependenciesNonNull().stream()
-            .filter(b -> {
-                if (!(failedToStart.get() || b.isNotCancelled()))
-                    failedToStart.set(true);
-
-                return b.getId() != null;
-            }).mapToInt(BuildRef::getId).toArray();
+        failedToStart.set(build.isFailedToStart());
+
+        int[] arr = build.getSnapshotDependenciesNonNull()
+                .stream()
+                .peek(b -> {
+                    if (failedToStart.get())
+                        return;
+
+                    if (b.hasUnknownStatus())
+                        failedToStart.set(true);
+                })
+                .filter(b -> b.getId() != null)
+                .mapToInt(BuildRef::getId)
+                .toArray();
 
         snapshotDeps = arr.length > 0 ? arr : null;
 


Mime
View raw message