You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2018/11/23 14:51:45 UTC

[ignite-teamcity-bot] branch ignite-9542 created (now e6bbf11)

This is an automated email from the ASF dual-hosted git repository.

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


      at e6bbf11  IGNITE-9542 Remove unused code, provide separated base/current branch history for PR page

This branch includes the following new commits:

     new e6bbf11  IGNITE-9542 Remove unused code, provide separated base/current branch history for PR page

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[ignite-teamcity-bot] 01/01: IGNITE-9542 Remove unused code, provide separated base/current branch history for PR page

Posted by dp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e6bbf11a3adcc96dd9cb73adb8efea0572983d09
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Fri Nov 23 17:51:31 2018 +0300

    IGNITE-9542 Remove unused code, provide separated base/current branch history for PR page
---
 .../apache/ignite/ci/IgnitePersistentTeamcity.java | 37 ++--------------------
 .../java/org/apache/ignite/ci/db/DbMigrations.java |  2 --
 2 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
index 14795cc..2766db3 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
@@ -127,8 +127,7 @@ public class IgnitePersistentTeamcity implements IAnalyticsEnabledTeamcity, ITea
         DbMigrations migrations = new DbMigrations(ignite, conn.serverId());
 
         migrations.dataMigration(
-            this::migrateOccurrencesToLatest,
-                buildsCache(), this::addBuildOccurrenceToFailuresStat,
+            buildsCache(), this::addBuildOccurrenceToFailuresStat,
                 buildsFailureRunStatCache(), testRunStatCache(),
                 visasHistStorage.visas());
     }
@@ -512,40 +511,8 @@ public class IgnitePersistentTeamcity implements IAnalyticsEnabledTeamcity, ITea
         }, next);
     }
 
-    private void migrateOccurrencesToLatest(TestOccurrences val) {
-        for (TestOccurrence next : val.getTests())
-            migrateTestOneOcurrToAddToLatest(next);
-    }
-
-    private void migrateTestOneOcurrToAddToLatest(TestOccurrence next) {
-        String name = next.getName();
-        if (Strings.isNullOrEmpty(name))
-            return;
-
-        if (next.isMutedTest() || next.isIgnoredTest())
-            return;
-
-        TestInBranch k = new TestInBranch(name, ITeamcity.DEFAULT);
-
-        testRunStatCache().invoke(k, (entry, arguments) -> {
-            TestInBranch key = entry.getKey();
-            TestOccurrence testOccurrence = (TestOccurrence)arguments[0];
-
-            RunStat val = entry.getValue();
-            if (val == null)
-                val = new RunStat(key.name);
-
-            val.addTestRunToLatest(testOccurrence, RunStat.ChangesState.UNKNOWN);
-
-            entry.setValue(val);
-
-            return null;
-        }, next);
-    }
-
     /** {@inheritDoc} */
-    @Override
-    public List<RunStat> topFailingSuite(int cnt) {
+    @Override public List<RunStat> topFailingSuite(int cnt) {
         return CollectionUtil.top(buildsFailureAnalysis(), cnt, Comparator.comparing(RunStat::getFailRate));
     }
 
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/db/DbMigrations.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/db/DbMigrations.java
index 8ead279..0df6cc2 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/db/DbMigrations.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/db/DbMigrations.java
@@ -42,7 +42,6 @@ import org.apache.ignite.ci.issue.IssuesStorage;
 import org.apache.ignite.ci.observer.CompactBuildsInfo;
 import org.apache.ignite.ci.tcmodel.result.Build;
 import org.apache.ignite.ci.tcmodel.result.stat.Statistics;
-import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrences;
 import org.apache.ignite.ci.web.model.CompactContributionKey;
 import org.apache.ignite.ci.web.model.CompactVisa;
 import org.apache.ignite.ci.web.model.CompactVisaRequest;
@@ -127,7 +126,6 @@ public class DbMigrations {
     }
 
     public void dataMigration(
-        Consumer<TestOccurrences> saveTestToLatest,
         Cache<String, Build> buildCache, Consumer<Build> saveBuildToStat,
         IgniteCache<SuiteInBranch, RunStat> suiteHistCache,
         IgniteCache<TestInBranch, RunStat> testHistCache,