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 2019/08/06 11:58:58 UTC
[ignite-teamcity-bot] branch master updated: Workaround for
problem: [TC Bot] Add button for force loading updates from TC
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 27e6181 Workaround for problem: [TC Bot] Add button for force loading updates from TC
27e6181 is described below
commit 27e6181fef885a91fe5c579a1a8b27775c93ae1d
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Tue Aug 6 14:58:52 2019 +0300
Workaround for problem: [TC Bot] Add button for force loading updates from TC
---
.../src/main/java/org/apache/ignite/tcignited/build/SuiteHistory.java | 2 +-
.../main/java/org/apache/ignite/tcignited/buildref/BuildRefDao.java | 4 +++-
.../java/org/apache/ignite/tcignited/history/HistoryCollector.java | 4 ++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/build/SuiteHistory.java b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/build/SuiteHistory.java
index fdca1d4..508e94f 100644
--- a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/build/SuiteHistory.java
+++ b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/build/SuiteHistory.java
@@ -86,7 +86,7 @@ public class SuiteHistory implements ISuiteRunHistory {
/**
* @param suiteInv suite invocation (build) to be added to history (summary).
*/
- public void addSuiteInvocation(SuiteInvocation suiteInv) {
+ private void addSuiteInvocation(SuiteInvocation suiteInv) {
suiteInv.tests().forEach(this::addTestInvocation);
suiteHist.addInvocation(suiteInv.suiteInvocation());
diff --git a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/buildref/BuildRefDao.java b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/buildref/BuildRefDao.java
index eba8972..c03f197 100644
--- a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/buildref/BuildRefDao.java
+++ b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/buildref/BuildRefDao.java
@@ -46,6 +46,7 @@ import org.apache.ignite.ci.teamcity.ignited.runhist.RunHistKey;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.util.GridIntList;
import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.tcbot.common.conf.TcBotSystemProperties;
import org.apache.ignite.tcbot.common.exeption.ExceptionUtil;
import org.apache.ignite.tcbot.common.interceptor.AutoProfiling;
import org.apache.ignite.tcbot.common.interceptor.GuavaCached;
@@ -74,8 +75,9 @@ public class BuildRefDao {
*/
private final com.google.common.cache.Cache<RunHistKey, List<BuildRefCompacted>> buildRefsInMemCache
= CacheBuilder.newBuilder()
- .maximumSize(8000)
+ .maximumSize(Boolean.valueOf(System.getProperty(TcBotSystemProperties.DEV_MODE)) ? 1000 : 8000)
.expireAfterAccess(16, TimeUnit.MINUTES)
+ .expireAfterWrite(17, TimeUnit.MINUTES) //workaround for stale records
.softValues()
.build();
diff --git a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/history/HistoryCollector.java b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/history/HistoryCollector.java
index 0bdea46..b74cc3c 100644
--- a/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/history/HistoryCollector.java
+++ b/tcbot-teamcity-ignited/src/main/java/org/apache/ignite/tcignited/history/HistoryCollector.java
@@ -101,6 +101,7 @@ public class HistoryCollector {
= CacheBuilder.newBuilder()
.maximumSize(Boolean.valueOf(System.getProperty(TcBotSystemProperties.DEV_MODE)) ? 1000 : 8000)
.expireAfterAccess(16, TimeUnit.MINUTES)
+ .expireAfterWrite(17, TimeUnit.MINUTES) //workaround for stale records
.softValues()
.build();
@@ -226,8 +227,7 @@ public class HistoryCollector {
int srvId = ITeamcityIgnited.serverIdToInt(srvCode);
Map<Integer, SuiteInvocation> suiteRunHist = histDao.getSuiteRunHist(srvId, buildTypeId, normalizedBaseBranch);
- logger.info("***** Found history for suite "
- + compactor.getStringFromId(buildTypeId)
+ logger.info("***** Found persisted history for suite " + compactor.getStringFromId(buildTypeId)
+ " branch " + compactor.getStringFromId(normalizedBaseBranch) + ": " + suiteRunHist.size() );
Set<Integer> buildIds = determineLatestBuilds(srvId, buildTypeId, normalizedBaseBranch, suiteRunHist.keySet());