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 ignite-9800 updated: IGNITE-9800: Refactored grouping services of TC Bot in the packages
Date Sat, 06 Oct 2018 11:21:29 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/ignite-9800 by this push:
     new 0ab5efb  IGNITE-9800: Refactored grouping services of TC Bot in the packages
0ab5efb is described below

commit 0ab5efb3757d064ad660613e802200b61d73219c
Author: Dmitriy Pavlov <dpavlov@apache.org>
AuthorDate: Sat Oct 6 14:21:30 2018 +0300

    IGNITE-9800: Refactored grouping services of TC Bot in the packages
---
 .../main/java/org/apache/ignite/ci/ITeamcity.java  |  2 +-
 .../apache/ignite/ci/IgnitePersistentTeamcity.java |  3 +--
 .../main/java/org/apache/ignite/ci/TcHelper.java   |  2 +-
 .../org/apache/ignite/ci/github/GitHubUser.java    | 18 +++++++++++++++++
 .../org/apache/ignite/ci/github/PullRequest.java   | 23 ++++++++++++++++++++++
 .../ci/github/ignited/GitHubConnIgnitedImpl.java   | 11 +++++++++++
 .../ci/github/ignited/GitHubIgnitedProvImpl.java   |  6 ++----
 .../ci/github/ignited/IGitHubConnIgnited.java      |  9 +++++++--
 .../github/ignited/IGitHubConnIgnitedProvider.java | 10 ++++------
 .../ci/github/pure/GitHubCachingProvider.java      |  5 +----
 .../ci/github/pure/IGitHubConnectionProvider.java  |  7 ++-----
 .../org/apache/ignite/ci/issue/IssueDetector.java  |  4 ++--
 .../ci/{ => tcbot}/chain/BuildChainProcessor.java  |  2 +-
 .../ci/{ => tcbot}/chain/PrChainsProcessor.java    |  8 ++++----
 .../chain/TrackedBranchChainsProcessor.java        |  4 +---
 .../ci/{ => tcbot}/visa/ContributionToCheck.java   |  2 +-
 .../visa/TcBotTriggerAndSignOffService.java        |  8 ++++----
 .../ignite/ci/user/TcBotUserLoginService.java      | 20 -------------------
 .../ci/web/model/current/SuiteCurrentStatus.java   |  3 +--
 .../ignite/ci/web/rest/GetChainResultsAsHtml.java  |  2 +-
 .../org/apache/ignite/ci/web/rest/Metrics.java     |  2 +-
 .../apache/ignite/ci/web/rest/TriggerBuild.java    |  4 ++--
 .../ci/web/rest/build/GetBuildTestFailures.java    |  2 +-
 .../org/apache/ignite/ci/web/rest/login/Login.java |  1 +
 .../ignite/ci/web/rest/pr/GetPrTestFailures.java   |  4 ++--
 .../rest/tracked/GetTrackedBranchTestResults.java  |  2 +-
 .../ignite/ci/web/rest/visa/TcBotVisaService.java  |  4 ++--
 27 files changed, 96 insertions(+), 72 deletions(-)

diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java
index 34b84b0..e0aa4df 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java
@@ -28,7 +28,7 @@ import javax.annotation.Nullable;
 import org.apache.ignite.ci.analysis.LogCheckResult;
 import org.apache.ignite.ci.analysis.MultBuildRunCtx;
 import org.apache.ignite.ci.analysis.SingleBuildRunCtx;
-import org.apache.ignite.ci.chain.BuildChainProcessor;
+import org.apache.ignite.ci.tcbot.chain.BuildChainProcessor;
 import org.apache.ignite.ci.tcmodel.agent.Agent;
 import org.apache.ignite.ci.tcmodel.changes.Change;
 import org.apache.ignite.ci.tcmodel.changes.ChangeRef;
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 83d5a4a..2010f0c 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
@@ -60,7 +60,6 @@ import org.apache.ignite.ci.analysis.TestInBranch;
 import org.apache.ignite.ci.db.DbMigrations;
 import org.apache.ignite.ci.db.TcHelperDb;
 import org.apache.ignite.ci.di.AutoProfiling;
-import org.apache.ignite.ci.github.PullRequest;
 import org.apache.ignite.ci.tcmodel.agent.Agent;
 import org.apache.ignite.ci.tcmodel.changes.Change;
 import org.apache.ignite.ci.tcmodel.changes.ChangesList;
@@ -82,7 +81,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXParseException;
 
-import static org.apache.ignite.ci.chain.BuildChainProcessor.normalizeBranch;
+import static org.apache.ignite.ci.tcbot.chain.BuildChainProcessor.normalizeBranch;
 
 /**
  * Apache Ignite based cache over teamcity responses
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java
index 51484c6..5be9135 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.ci;
 
-import org.apache.ignite.ci.chain.PrChainsProcessor;
+import org.apache.ignite.ci.tcbot.chain.PrChainsProcessor;
 import org.apache.ignite.ci.conf.BranchesTracked;
 import org.apache.ignite.ci.issue.IssueDetector;
 import org.apache.ignite.ci.issue.IssuesStorage;
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/GitHubUser.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/GitHubUser.java
index 7ed903d..a7172c3 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/GitHubUser.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/GitHubUser.java
@@ -1,5 +1,7 @@
 package org.apache.ignite.ci.github;
 
+import com.google.common.base.Objects;
+
 public class GitHubUser {
     public String login;
     public String avatar_url;
@@ -25,4 +27,20 @@ public class GitHubUser {
      *       "site_admin": false
      *     },
      */
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+        if (o == null || getClass() != o.getClass())
+            return false;
+        GitHubUser user = (GitHubUser)o;
+        return Objects.equal(login, user.login) &&
+            Objects.equal(avatar_url, user.avatar_url);
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        return Objects.hashCode(login, avatar_url);
+    }
 }
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/PullRequest.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/PullRequest.java
index b49aee9..afd2722 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/PullRequest.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/PullRequest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.ci.github;
 
 import com.google.common.base.MoreObjects;
+import com.google.common.base.Objects;
 import com.google.gson.annotations.SerializedName;
 
 /**
@@ -85,6 +86,7 @@ public class PullRequest {
         return htmlUrl;
     }
 
+    /** {@inheritDoc} */
     @Override public String toString() {
         return MoreObjects.toStringHelper(this)
             .add("num", num)
@@ -93,4 +95,25 @@ public class PullRequest {
             .add("statusesUrl", statusesUrl)
             .toString();
     }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+        if (o == null || getClass() != o.getClass())
+            return false;
+        PullRequest req = (PullRequest)o;
+        return num == req.num &&
+            Objects.equal(state, req.state) &&
+            Objects.equal(title, req.title) &&
+            Objects.equal(htmlUrl, req.htmlUrl) &&
+            Objects.equal(updatedAt, req.updatedAt) &&
+            Objects.equal(statusesUrl, req.statusesUrl) &&
+            Objects.equal(gitHubUser, req.gitHubUser);
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        return Objects.hashCode(num, state, title, htmlUrl, updatedAt, statusesUrl, gitHubUser);
+    }
 }
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubConnIgnitedImpl.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubConnIgnitedImpl.java
index 3a87c88..1d2ff00 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubConnIgnitedImpl.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubConnIgnitedImpl.java
@@ -24,6 +24,7 @@ import java.util.concurrent.TimeUnit;
 import javax.inject.Inject;
 import javax.inject.Provider;
 import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.ci.di.AutoProfiling;
 import org.apache.ignite.ci.github.PullRequest;
@@ -33,6 +34,7 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.jetbrains.annotations.NotNull;
 
 class GitHubConnIgnitedImpl implements IGitHubConnIgnited {
+    public static final String GIT_HUB_PR = "gitHubPr";
     private String id;
     private IGitHubConnection conn;
 
@@ -46,9 +48,18 @@ class GitHubConnIgnitedImpl implements IGitHubConnIgnited {
         .softValues()
         .build();
 
+    /** Server ID mask for cache Entries. */
+    private long serverIdMask;
+
+    private IgniteCache<Long, PullRequest> prCache;
+
     public void init(String srvId, IGitHubConnection conn) {
         id = srvId;
         this.conn = conn;
+
+        serverIdMask = ((long)srvId.hashCode()) << 32;
+
+        prCache = igniteProvider.get().getOrCreateCache(getCache8PartsConfig(GIT_HUB_PR));
     }
 
     @NotNull
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubIgnitedProvImpl.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubIgnitedProvImpl.java
index 727e503..bba2356 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubIgnitedProvImpl.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/GitHubIgnitedProvImpl.java
@@ -21,12 +21,10 @@ import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
-import javax.annotation.Nullable;
 import javax.inject.Inject;
 import javax.inject.Provider;
 import org.apache.ignite.ci.github.pure.IGitHubConnection;
 import org.apache.ignite.ci.github.pure.IGitHubConnectionProvider;
-import org.apache.ignite.ci.user.ICredentialsProv;
 import org.apache.ignite.ci.util.ExceptionUtil;
 
 class GitHubIgnitedProvImpl implements IGitHubConnIgnitedProvider {
@@ -41,10 +39,10 @@ class GitHubIgnitedProvImpl implements IGitHubConnIgnitedProvider {
         .build();
 
     /** {@inheritDoc} */
-    @Override public IGitHubConnIgnited server(String srvId, @Nullable ICredentialsProv prov)
{
+    @Override public IGitHubConnIgnited server(String srvId) {
         try {
             return srvs.get(Strings.nullToEmpty(srvId), () -> {
-                IGitHubConnection srv = pureConnProv.server(srvId, prov);
+                IGitHubConnection srv = pureConnProv.server(srvId);
                 GitHubConnIgnitedImpl ignited = ignitedProvider.get();
                 ignited.init(srvId, srv);
                 return ignited;
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/IGitHubConnIgnited.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/IGitHubConnIgnited.java
index 726fdab..31dd8f7 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/IGitHubConnIgnited.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/IGitHubConnIgnited.java
@@ -19,7 +19,12 @@ package org.apache.ignite.ci.github.ignited;
 import java.util.List;
 import org.apache.ignite.ci.github.PullRequest;
 
+/**
+ *
+ */
 public interface IGitHubConnIgnited {
-
-    List<PullRequest> getPullRequests();
+    /**
+     * @return list of open pull requests
+     */
+    public List<PullRequest> getPullRequests();
 }
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/IGitHubConnIgnitedProvider.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/IGitHubConnIgnitedProvider.java
index 69dcf02..729e77e 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/IGitHubConnIgnitedProvider.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/ignited/IGitHubConnIgnitedProvider.java
@@ -16,14 +16,12 @@
  */
 package org.apache.ignite.ci.github.ignited;
 
-import javax.annotation.Nullable;
-import org.apache.ignite.ci.github.pure.IGitHubConnection;
-import org.apache.ignite.ci.user.ICredentialsProv;
-
+/**
+ *
+ */
 public interface IGitHubConnIgnitedProvider {
     /**
      * @param srvId Server id.
-     * @param prov Prov.
      */
-    public IGitHubConnIgnited server(String srvId, @Nullable ICredentialsProv prov);
+    public IGitHubConnIgnited server(String srvId);
 }
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubCachingProvider.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubCachingProvider.java
index 0f11d5a..67adcae 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubCachingProvider.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubCachingProvider.java
@@ -19,13 +19,10 @@ package org.apache.ignite.ci.github.pure;
 import com.google.common.base.Strings;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
-import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
-import javax.annotation.Nullable;
 import javax.inject.Inject;
 import javax.inject.Provider;
-import org.apache.ignite.ci.user.ICredentialsProv;
 import org.apache.ignite.ci.util.ExceptionUtil;
 
 class GitHubCachingProvider implements IGitHubConnectionProvider {
@@ -38,7 +35,7 @@ class GitHubCachingProvider implements IGitHubConnectionProvider {
         .build();
 
     /** {@inheritDoc} */
-    @Override public IGitHubConnection server(String srvId, @Nullable ICredentialsProv prov)
{
+    @Override public IGitHubConnection server(String srvId) {
         try {
             return srvs.get(Strings.nullToEmpty(srvId), () -> {
                 IGitHubConnection conn = factory.get();
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/IGitHubConnectionProvider.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/IGitHubConnectionProvider.java
index 86f2507..71e7844 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/IGitHubConnectionProvider.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/IGitHubConnectionProvider.java
@@ -16,13 +16,10 @@
  */
 package org.apache.ignite.ci.github.pure;
 
-import javax.annotation.Nullable;
-import org.apache.ignite.ci.user.ICredentialsProv;
-
 public interface IGitHubConnectionProvider {
     /**
      * @param srvId Server id.
-     * @param prov Prov.
+     *
      */
-    public IGitHubConnection server(String srvId, @Nullable ICredentialsProv prov);
+    public IGitHubConnection server(String srvId);
 }
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/issue/IssueDetector.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/issue/IssueDetector.java
index af27880..a7c0a45 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/issue/IssueDetector.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/issue/IssueDetector.java
@@ -40,7 +40,7 @@ import org.apache.ignite.ci.ITeamcity;
 import org.apache.ignite.ci.analysis.RunStat;
 import org.apache.ignite.ci.analysis.SuiteInBranch;
 import org.apache.ignite.ci.analysis.TestInBranch;
-import org.apache.ignite.ci.chain.TrackedBranchChainsProcessor;
+import org.apache.ignite.ci.tcbot.chain.TrackedBranchChainsProcessor;
 import org.apache.ignite.ci.di.AutoProfiling;
 import org.apache.ignite.ci.di.MonitoredTask;
 import org.apache.ignite.ci.jobs.CheckQueueJob;
@@ -62,7 +62,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import static com.google.common.base.Strings.isNullOrEmpty;
-import static org.apache.ignite.ci.chain.BuildChainProcessor.normalizeBranch;
+import static org.apache.ignite.ci.tcbot.chain.BuildChainProcessor.normalizeBranch;
 
 /**
  *
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/chain/BuildChainProcessor.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/BuildChainProcessor.java
similarity index 99%
rename from ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/chain/BuildChainProcessor.java
rename to ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/BuildChainProcessor.java
index fd93f87..921619b 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/chain/BuildChainProcessor.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/BuildChainProcessor.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.ci.chain;
+package org.apache.ignite.ci.tcbot.chain;
 
 import java.util.ArrayList;
 import java.util.Collection;
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/chain/PrChainsProcessor.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessor.java
similarity index 95%
rename from ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/chain/PrChainsProcessor.java
rename to ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessor.java
index 796800b..be2a7a3 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/chain/PrChainsProcessor.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessor.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.ignite.ci.chain;
+package org.apache.ignite.ci.tcbot.chain;
 
 import com.google.common.base.Strings;
 import org.apache.ignite.ci.IAnalyticsEnabledTeamcity;
@@ -49,7 +49,7 @@ public class PrChainsProcessor {
 
     /** Tc server provider. */
     @Inject ITcServerProvider tcSrvProvider;
-    @Inject IGitHubConnectionProvider gitHubConnectionProvider;
+    @Inject IGitHubConnectionProvider gitHubConnProvider;
 
     /**
      * @param creds Credentials.
@@ -78,9 +78,9 @@ public class PrChainsProcessor {
         //using here non persistent TC allows to skip update statistic
         IAnalyticsEnabledTeamcity teamcity = tcSrvProvider.server(srvId, creds);
 
-        IGitHubConnection gitHubConnection = gitHubConnectionProvider.server(srvId, creds);
+        IGitHubConnection gitHubConn = gitHubConnProvider.server(srvId);
 
-        res.setJavaFlags(teamcity, gitHubConnection);
+        res.setJavaFlags(teamcity, gitHubConn);
 
         LatestRebuildMode rebuild;
         if (FullQueryParams.HISTORY.equals(act))
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/chain/TrackedBranchChainsProcessor.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java
similarity index 97%
rename from ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/chain/TrackedBranchChainsProcessor.java
rename to ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java
index 3e4dbff..c29a964 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/chain/TrackedBranchChainsProcessor.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java
@@ -14,14 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.ignite.ci.chain;
+package org.apache.ignite.ci.tcbot.chain;
 
 import java.util.Comparator;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
 import javax.inject.Inject;
-import javax.ws.rs.QueryParam;
 import org.apache.ignite.ci.HelperConfig;
 import org.apache.ignite.ci.IAnalyticsEnabledTeamcity;
 import org.apache.ignite.ci.ITcServerProvider;
@@ -32,7 +31,6 @@ import org.apache.ignite.ci.conf.BranchTracked;
 import org.apache.ignite.ci.di.AutoProfiling;
 import org.apache.ignite.ci.tcmodel.hist.BuildRef;
 import org.apache.ignite.ci.user.ICredentialsProv;
-import org.apache.ignite.ci.web.TcUpdatePool;
 import org.apache.ignite.ci.web.model.current.ChainAtServerCurrentStatus;
 import org.apache.ignite.ci.web.model.current.TestFailuresSummary;
 import org.apache.ignite.ci.web.rest.parms.FullQueryParams;
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/visa/ContributionToCheck.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/visa/ContributionToCheck.java
similarity index 95%
rename from ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/visa/ContributionToCheck.java
rename to ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/visa/ContributionToCheck.java
index 8781cef..13ed63e 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/visa/ContributionToCheck.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/visa/ContributionToCheck.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.ignite.ci.visa;
+package org.apache.ignite.ci.tcbot.visa;
 
 /**
  *
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/visa/TcBotTriggerAndSignOffService.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/visa/TcBotTriggerAndSignOffService.java
similarity index 98%
rename from ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/visa/TcBotTriggerAndSignOffService.java
rename to ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/visa/TcBotTriggerAndSignOffService.java
index 41046e3..82d7995 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/visa/TcBotTriggerAndSignOffService.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/visa/TcBotTriggerAndSignOffService.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.ci.visa;
+package org.apache.ignite.ci.tcbot.visa;
 
 import com.google.common.base.Strings;
 import com.google.inject.Provider;
@@ -113,7 +113,7 @@ public class TcBotTriggerAndSignOffService {
     ) {
         if (F.isEmpty(ticketId)) {
             try {
-                IGitHubConnection gitHubConnection = gitHubConnectionProvider.server(srvId,
prov);
+                IGitHubConnection gitHubConnection = gitHubConnectionProvider.server(srvId);
 
                 PullRequest pr = gitHubConnection.getPullRequest(branchForTc);
 
@@ -150,7 +150,7 @@ public class TcBotTriggerAndSignOffService {
 
         if (Strings.isNullOrEmpty(ticketId)) {
             try {
-                IGitHubConnection gitHubConn = gitHubConnectionProvider.server(srvId, prov);
+                IGitHubConnection gitHubConn = gitHubConnectionProvider.server(srvId);
                 PullRequest pr = gitHubConn.getPullRequest(branchForTc);
 
                 ticketId = TcBotTriggerAndSignOffService.getTicketId(pr);
@@ -179,7 +179,7 @@ public class TcBotTriggerAndSignOffService {
     }
 
     public List<ContributionToCheck> getContributionsToCheck(String srvId) {
-        IGitHubConnIgnited gitHubConn = gitHubConnIgnitedProvider.server(srvId, null);
+        IGitHubConnIgnited gitHubConn = gitHubConnIgnitedProvider.server(srvId);
         List<PullRequest> requests = gitHubConn.getPullRequests();
         if (requests == null)
             return null;
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/user/TcBotUserLoginService.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/user/TcBotUserLoginService.java
deleted file mode 100644
index fdcf9be..0000000
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/user/TcBotUserLoginService.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.ci.user;
-
-public class TcBotUserLoginService {
-}
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 86adfa3..9498654 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
@@ -32,7 +32,6 @@ import javax.annotation.Nullable;
 import org.apache.ignite.ci.ITcAnalytics;
 import org.apache.ignite.ci.ITeamcity;
 import org.apache.ignite.ci.analysis.ITestFailureOccurrences;
-import org.apache.ignite.ci.analysis.LogCheckResult;
 import org.apache.ignite.ci.analysis.MultBuildRunCtx;
 import org.apache.ignite.ci.analysis.RunStat;
 import org.apache.ignite.ci.analysis.SuiteInBranch;
@@ -45,7 +44,7 @@ import org.apache.ignite.ci.web.model.hist.FailureSummary;
 import org.apache.ignite.ci.web.rest.GetBuildLog;
 import org.jetbrains.annotations.NotNull;
 
-import static org.apache.ignite.ci.chain.BuildChainProcessor.normalizeBranch;
+import static org.apache.ignite.ci.tcbot.chain.BuildChainProcessor.normalizeBranch;
 import static org.apache.ignite.ci.util.TimeUtil.millisToDurationPrintable;
 import static org.apache.ignite.ci.util.UrlUtil.escape;
 
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/GetChainResultsAsHtml.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/GetChainResultsAsHtml.java
index 920e548..78811ae 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/GetChainResultsAsHtml.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/GetChainResultsAsHtml.java
@@ -29,7 +29,7 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 
 import com.google.inject.Injector;
-import org.apache.ignite.ci.chain.BuildChainProcessor;
+import org.apache.ignite.ci.tcbot.chain.BuildChainProcessor;
 import org.apache.ignite.ci.IAnalyticsEnabledTeamcity;
 import org.apache.ignite.ci.ITeamcity;
 import org.apache.ignite.ci.analysis.FullChainRunCtx;
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/Metrics.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/Metrics.java
index 97fad42..1afb02a 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/Metrics.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/Metrics.java
@@ -33,7 +33,7 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 
 import org.apache.ignite.ci.IAnalyticsEnabledTeamcity;
-import org.apache.ignite.ci.chain.BuildChainProcessor;
+import org.apache.ignite.ci.tcbot.chain.BuildChainProcessor;
 import org.apache.ignite.ci.HelperConfig;
 import org.apache.ignite.ci.ITeamcity;
 import org.apache.ignite.ci.analysis.FullChainRunCtx;
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/TriggerBuild.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/TriggerBuild.java
index 6acb1ba..63539fb 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/TriggerBuild.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/TriggerBuild.java
@@ -37,7 +37,7 @@ import org.apache.ignite.ci.conf.ServerIntegrationLinks;
 import org.apache.ignite.ci.github.pure.IGitHubConnection;
 import org.apache.ignite.ci.github.pure.IGitHubConnectionProvider;
 import org.apache.ignite.ci.user.ICredentialsProv;
-import org.apache.ignite.ci.visa.TcBotTriggerAndSignOffService;
+import org.apache.ignite.ci.tcbot.visa.TcBotTriggerAndSignOffService;
 import org.apache.ignite.ci.web.CtxListener;
 import org.apache.ignite.ci.web.rest.exception.ServiceUnauthorizedException;
 import org.apache.ignite.ci.web.model.SimpleResult;
@@ -144,7 +144,7 @@ public class TriggerBuild {
             final ICredentialsProv creds = ICredentialsProv.get(req);
             ITeamcity teamcity = tcHelper.server(srvId, creds);
 
-            IGitHubConnection gh = injector.getInstance(IGitHubConnectionProvider.class).server(srvId,
prov);
+            IGitHubConnection gh = injector.getInstance(IGitHubConnectionProvider.class).server(srvId);
 
             return new ServerIntegrationLinks(srvId, gh.gitApiUrl(), teamcity.getJiraApiUrl());
         }).filter(Objects::nonNull).collect(Collectors.toSet());
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/build/GetBuildTestFailures.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/build/GetBuildTestFailures.java
index e80a73f..15692c8 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/build/GetBuildTestFailures.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/build/GetBuildTestFailures.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.ci.web.rest.build;
 
 import com.google.inject.Injector;
-import org.apache.ignite.ci.chain.BuildChainProcessor;
+import org.apache.ignite.ci.tcbot.chain.BuildChainProcessor;
 import org.apache.ignite.ci.IAnalyticsEnabledTeamcity;
 import org.apache.ignite.ci.ITcHelper;
 import org.apache.ignite.ci.ITeamcity;
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/login/Login.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/login/Login.java
index 065a5e7..7b29353 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/login/Login.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/login/Login.java
@@ -47,6 +47,7 @@ public class Login {
     public static final int SESS_ID_LEN = 8;
     public static final int SALT_LEN = 16;
 
+    /** Context. */
     @Context
     private ServletContext ctx;
 
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/pr/GetPrTestFailures.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/pr/GetPrTestFailures.java
index 885c783..ca93dc5 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/pr/GetPrTestFailures.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/pr/GetPrTestFailures.java
@@ -21,7 +21,7 @@ import javax.ws.rs.FormParam;
 import javax.ws.rs.POST;
 
 import com.google.inject.Injector;
-import org.apache.ignite.ci.chain.PrChainsProcessor;
+import org.apache.ignite.ci.tcbot.chain.PrChainsProcessor;
 import org.apache.ignite.ci.github.pure.IGitHubConnection;
 import org.apache.ignite.ci.github.pure.IGitHubConnectionProvider;
 import org.apache.ignite.ci.github.PullRequest;
@@ -135,7 +135,7 @@ public class GetPrTestFailures {
 
         final Injector injector = CtxListener.getInjector(ctx);
         final ICredentialsProv creds = ICredentialsProv.get(req);
-        final IGitHubConnection srv = injector.getInstance(IGitHubConnectionProvider.class).server(srvId,
creds);
+        final IGitHubConnection srv = injector.getInstance(IGitHubConnectionProvider.class).server(srvId);
 
         PullRequest pr;
 
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/tracked/GetTrackedBranchTestResults.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/tracked/GetTrackedBranchTestResults.java
index e68c992..582b9e3 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/tracked/GetTrackedBranchTestResults.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/tracked/GetTrackedBranchTestResults.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.ci.web.rest.tracked;
 
-import org.apache.ignite.ci.chain.TrackedBranchChainsProcessor;
+import org.apache.ignite.ci.tcbot.chain.TrackedBranchChainsProcessor;
 import org.apache.ignite.ci.user.ICredentialsProv;
 import org.apache.ignite.ci.web.BackgroundUpdater;
 import org.apache.ignite.ci.web.CtxListener;
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/visa/TcBotVisaService.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/visa/TcBotVisaService.java
index 033ac2b..9b9da8c 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/visa/TcBotVisaService.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/visa/TcBotVisaService.java
@@ -26,8 +26,8 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import org.apache.ignite.ci.user.ICredentialsProv;
-import org.apache.ignite.ci.visa.ContributionToCheck;
-import org.apache.ignite.ci.visa.TcBotTriggerAndSignOffService;
+import org.apache.ignite.ci.tcbot.visa.ContributionToCheck;
+import org.apache.ignite.ci.tcbot.visa.TcBotTriggerAndSignOffService;
 import org.apache.ignite.ci.web.CtxListener;
 import org.apache.ignite.ci.web.rest.exception.ServiceUnauthorizedException;
 import org.jetbrains.annotations.Nullable;


Mime
View raw message