You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2018/12/21 14:46:33 UTC

[GitHub] asfgit closed pull request #104: IGNITE-10215 Inspections Core monitoring fix

asfgit closed pull request #104: IGNITE-10215 Inspections Core monitoring fix
URL: https://github.com/apache/ignite-teamcity-bot/pull/104
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/ISuiteResults.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/ISuiteResults.java
index ad2df5cf..3f41f4bb 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/ISuiteResults.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/ISuiteResults.java
@@ -24,6 +24,9 @@
     /** */
     boolean hasCompilationProblem();
 
+    /** */
+    boolean hasMetricProblem();
+
     boolean hasTimeoutProblem();
 
     boolean hasJvmCrashProblem();
@@ -33,7 +36,10 @@
     boolean hasExitCodeProblem();
 
     default boolean hasCriticalProblem() {
-        return hasJvmCrashProblem() || hasTimeoutProblem() || hasCompilationProblem();
+        return hasJvmCrashProblem()
+            || hasTimeoutProblem()
+            || hasCompilationProblem()
+            || hasMetricProblem();
     }
 
     default boolean hasSuiteIncompleteFailure() {
@@ -41,7 +47,8 @@ default boolean hasSuiteIncompleteFailure() {
             || hasTimeoutProblem()
             || hasOomeProblem()
             || hasExitCodeProblem()
-            || hasCompilationProblem();
+            || hasCompilationProblem()
+            || hasMetricProblem();
     }
 
     String suiteId();
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/MultBuildRunCtx.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/MultBuildRunCtx.java
index 2a942dec..4a0f4494 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/MultBuildRunCtx.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/MultBuildRunCtx.java
@@ -116,6 +116,16 @@ public boolean onlyCancelledBuilds() {
         return builds;
     }
 
+    /** {@inheritDoc} */
+    @Override public boolean hasMetricProblem() {
+        return getMetricProblemCount() > 0;
+    }
+
+    /** */
+    public long getMetricProblemCount() {
+        return buildsStream().filter(ISuiteResults::hasMetricProblem).count();
+    }
+
     /** {@inheritDoc} */
     @Override public boolean hasCompilationProblem() {
         return getCompilationProblemCount() > 0;
@@ -188,11 +198,13 @@ public String getResult() {
         addKnownProblemCnt(res, "Out Of Memory Error", getOomeProblemCount());
         addKnownProblemCnt(res, "Exit Code", getExitCodeProblemsCount());
         addKnownProblemCnt(res, "Compilation Error", getCompilationProblemCount());
+        addKnownProblemCnt(res, "Failure on metric", getMetricProblemCount());
 
         {
             Stream<ProblemCompacted> stream =
                 allProblemsInAllBuilds().filter(p ->
                     !p.isFailedTests(compactor)
+                        && !p.isBuildFailureOnMetric(compactor)
                         && !p.isCompilationError(compactor)
                         && !p.isSnapshotDepProblem(compactor)
                         && !p.isExecutionTimeout(compactor)
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/SingleBuildRunCtx.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/SingleBuildRunCtx.java
index 441297c5..7d0833bb 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/SingleBuildRunCtx.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/analysis/SingleBuildRunCtx.java
@@ -68,6 +68,11 @@ public Integer buildId() {
         return buildCompacted.id() < 0 ? null : buildCompacted.id();
     }
 
+    /** {@inheritDoc} */
+    @Override public boolean hasMetricProblem() {
+        return getProblemsStream().anyMatch(p -> p.isBuildFailureOnMetric(compactor));
+    }
+
     /** {@inheritDoc} */
     @Override public boolean hasCompilationProblem() {
         return getProblemsStream().anyMatch(p -> p.isCompilationError(compactor));
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/runhist/RunHistSync.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/runhist/RunHistSync.java
index 0eb4e443..15fe255d 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/runhist/RunHistSync.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/runhist/RunHistSync.java
@@ -187,7 +187,8 @@ protected String saveBuildToHistory(String srvName, int ldrToActivate) {
         buildsSaveThisRun.forEach(
             (histKey, suiteList) -> {
                 List<Invocation> invocationsToSave = suiteList.stream()
-                    .filter(inv -> confirmedNewBuild.contains(inv.buildId()))
+                    .filter(inv -> confirmedNewBuild.contains(inv.buildId())
+                        || histDao.setBuildProcessed(histKey.srvId(), inv.buildId(), inv.startDate()))
                     .filter(inv -> !InvocationData.isExpired(inv.startDate()))
                     .collect(Collectors.toList());
 
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/SuiteCurrentStatus.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/SuiteCurrentStatus.java
index 6c059c8e..5c41d4c1 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/SuiteCurrentStatus.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/SuiteCurrentStatus.java
@@ -58,7 +58,7 @@
     /** Suite Run Result (filled if failed): Summary of build problems, count of tests, etc. */
     public String result;
 
-    /** Has critical problem: Timeout, JMV Crash or Compilation Error*/
+    /** Has critical problem: Timeout, JMV Crash, Compilation Error or Failure on Metric*/
     @Nullable public Boolean hasCriticalProblem;
 
     /** Web Href. to suite runs history */
diff --git a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
index 21c58902..e5123cfb 100644
--- a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
+++ b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
@@ -979,7 +979,9 @@ function drawLatestRuns(latestRuns) {
         return "";
 
     var res = "";
-    res += "<nobr><span style='white-space: nowrap; width:" + (latestRuns.length  * 1) + "px; display: inline-block;' title='Latest master runs history from right to left is oldest to newest. Red-failed,green-passed,black-timeout'>";
+    res += "<nobr><span style='white-space: nowrap; width:" + (latestRuns.length  * 1) + "px; display: inline-block;' " +
+        "title='Latest master runs history from right to left is oldest to newest." +
+        " Red-failed,green-passed,black-critical failure'>";
 
     var len = 1;
     var prevState = null;


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services