[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16713267#comment-16713267
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239939993
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteDao.java
 ##
 @@ -0,0 +1,126 @@
+/*
+ * 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.tcmodel.mute;
+
+import com.google.common.base.Preconditions;
+import java.util.Set;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.ci.db.TcHelperDb;
+import org.apache.ignite.ci.di.AutoProfiling;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ *
+ */
+public class MuteDao {
+/** Cache name. */
+public static final String TEAMCITY_MUTE_CACHE_NAME = "teamcityMute";
+
+/** Ignite provider. */
+@Inject private Provider igniteProvider;
+
+/** Builds cache. */
+private IgniteCache muteCache;
+
+/** Compactor. */
+@Inject private IStringCompactor compactor;
+
+/**
+ *
+ */
+public void init() {
+muteCache = 
igniteProvider.get().getOrCreateCache(TcHelperDb.getCacheV2Config(TEAMCITY_MUTE_CACHE_NAME));
+}
+
+/**
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build id.
+ */
+@AutoProfiling
+public Mutes getMutes(int srvIdMaskHigh, String projectId) {
+Preconditions.checkNotNull(muteCache, "init() was not called");
+
+MutesCompacted compacted = 
muteCache.get(projectIdToCacheKey(srvIdMaskHigh, projectId));
+
+return compacted != null ? compacted.toMutes(compactor) : new Mutes();
+}
+
+/**
+ * Combine server and project into key for storage.
+ *
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build type id.
+ * @return Key from server-project pair.
+ */
+public static long projectIdToCacheKey(long srvIdMaskHigh, String 
projectId) {
+return (long)projectId.hashCode() | srvIdMaskHigh << 32;
+}
+
+/**
+ * Save small part of loaded mutes.
+ *
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @param chunk Chunk.
+ */
+public void saveChunk(int srvId, String projectId, Set chunk) {
 
 Review comment:
   To make this method thread-safe we should lock on updated entry before 
read-update-modify. But please consider cache transformation instead.


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16713266#comment-16713266
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239939993
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteDao.java
 ##
 @@ -0,0 +1,126 @@
+/*
+ * 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.tcmodel.mute;
+
+import com.google.common.base.Preconditions;
+import java.util.Set;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.ci.db.TcHelperDb;
+import org.apache.ignite.ci.di.AutoProfiling;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ *
+ */
+public class MuteDao {
+/** Cache name. */
+public static final String TEAMCITY_MUTE_CACHE_NAME = "teamcityMute";
+
+/** Ignite provider. */
+@Inject private Provider igniteProvider;
+
+/** Builds cache. */
+private IgniteCache muteCache;
+
+/** Compactor. */
+@Inject private IStringCompactor compactor;
+
+/**
+ *
+ */
+public void init() {
+muteCache = 
igniteProvider.get().getOrCreateCache(TcHelperDb.getCacheV2Config(TEAMCITY_MUTE_CACHE_NAME));
+}
+
+/**
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build id.
+ */
+@AutoProfiling
+public Mutes getMutes(int srvIdMaskHigh, String projectId) {
+Preconditions.checkNotNull(muteCache, "init() was not called");
+
+MutesCompacted compacted = 
muteCache.get(projectIdToCacheKey(srvIdMaskHigh, projectId));
+
+return compacted != null ? compacted.toMutes(compactor) : new Mutes();
+}
+
+/**
+ * Combine server and project into key for storage.
+ *
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build type id.
+ * @return Key from server-project pair.
+ */
+public static long projectIdToCacheKey(long srvIdMaskHigh, String 
projectId) {
+return (long)projectId.hashCode() | srvIdMaskHigh << 32;
+}
+
+/**
+ * Save small part of loaded mutes.
+ *
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @param chunk Chunk.
+ */
+public void saveChunk(int srvId, String projectId, Set chunk) {
 
 Review comment:
   To make this method concurrent we should lock on updated entry. But please 
consider cache transformation instead.


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16713263#comment-16713263
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239939250
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteDao.java
 ##
 @@ -0,0 +1,126 @@
+/*
+ * 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.tcmodel.mute;
+
+import com.google.common.base.Preconditions;
+import java.util.Set;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.ci.db.TcHelperDb;
+import org.apache.ignite.ci.di.AutoProfiling;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ *
+ */
+public class MuteDao {
+/** Cache name. */
+public static final String TEAMCITY_MUTE_CACHE_NAME = "teamcityMute";
+
+/** Ignite provider. */
+@Inject private Provider igniteProvider;
+
+/** Builds cache. */
+private IgniteCache muteCache;
+
+/** Compactor. */
+@Inject private IStringCompactor compactor;
+
+/**
+ *
+ */
+public void init() {
+muteCache = 
igniteProvider.get().getOrCreateCache(TcHelperDb.getCacheV2Config(TEAMCITY_MUTE_CACHE_NAME));
+}
+
+/**
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build id.
+ */
+@AutoProfiling
+public Mutes getMutes(int srvIdMaskHigh, String projectId) {
+Preconditions.checkNotNull(muteCache, "init() was not called");
+
+MutesCompacted compacted = 
muteCache.get(projectIdToCacheKey(srvIdMaskHigh, projectId));
+
+return compacted != null ? compacted.toMutes(compactor) : new Mutes();
+}
+
+/**
+ * Combine server and project into key for storage.
+ *
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build type id.
+ * @return Key from server-project pair.
+ */
+public static long projectIdToCacheKey(long srvIdMaskHigh, String 
projectId) {
+return (long)projectId.hashCode() | srvIdMaskHigh << 32;
+}
+
+/**
+ * Save small part of loaded mutes.
+ *
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @param chunk Chunk.
+ */
+public void saveChunk(int srvId, String projectId, Set chunk) {
+if (F.isEmpty(chunk))
+return;
+
+long key = projectIdToCacheKey(srvId, projectId);
+MutesCompacted compacted = muteCache.get(key);
 
 Review comment:
   What if we transform muteCache entries to be separated for each mute 
occurrence? It will save disk IO and saveChunk will become concurrent. We can 
use putAll for saving, and ScanQuery for extracting mutes related to a 
particular project. Actually, I expect there will be just 1 project.


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712828#comment-16712828
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239799469
 
 

 ##
 File path: 
ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/di/scheduler/DirectExecNoWaitScheduler.java
 ##
 @@ -21,7 +21,7 @@
 /**
  * Sheduler which never waits
  */
-public class DirectExecNoWaitSheduler implements IScheduler {
+public class DirectExecNoWaitScheduler implements IScheduler {
 
 Review comment:
   Always feel free to create a separate small PRs for such changes (srvNme, 
misprints, etc). It is easier to accept such small changes without relation to 
a big feature. Big feature change can be rejected, but small and needed changes 
will wait. With a separate PRs is it easy to accept separately 
A)refactoring/improving/misprints corrections and B) big feature.


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712825#comment-16712825
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239798869
 
 

 ##
 File path: ignite-tc-helper-web/src/main/webapp/mutes.html
 ##
 @@ -0,0 +1,224 @@
+
+
+
+
+Apache Ignite Teamcity Bot - Muted tests
+
+https://code.jquery.com/jquery-1.12.4.js";>
+https://code.jquery.com/ui/1.12.1/jquery-ui.js";>
+
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+
+https://cdn.datatables.net/1.10.16/js/jquery.dataTables.js";>
+https://cdn.datatables.net/1.10.16/js/dataTables.jqueryui.js";>
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css;>
+

[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712807#comment-16712807
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239795515
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteScope.java
 ##
 @@ -0,0 +1,65 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import org.apache.ignite.ci.tcmodel.conf.BuildType;
+import org.apache.ignite.ci.tcmodel.conf.Project;
+
+/**
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+public class MuteScope {
+/** Project. */
+@XmlElement public Project project;
+
+/** Build types. */
+@XmlElementWrapper(name = "buildTypes")
+@XmlElement(name = "buildType")
+public List buildTypes;
+
+/** {@inheritDoc} */
+@Override public boolean equals(Object o) {
 
 Review comment:
   Do we really need to compare XML models? If so I suggest to use Objects & 
generated code


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712824#comment-16712824
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239798519
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/tracked/GetTrackedBranchTestResults.java
 ##
 @@ -140,4 +145,31 @@ public TestFailuresSummary 
getAllTestFailsNoCache(@Nullable @QueryParam("branch"
 
 return tbProc.getTrackedBranchTestFailures(branchOpt, checkAllLogs, 
cntLimit, creds);
 }
+
+/**
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @return Mutes for given server-project pair.
+ */
+@GET
+@Path("mutes")
+public Set mutes(
+@Nullable @QueryParam("serverId") String srvId,
+@Nullable @QueryParam("projectId") String projectId
+) {
+ICredentialsProv creds = ICredentialsProv.get(req);
+
+if (F.isEmpty(srvId))
+srvId = "apache";
+
+if (F.isEmpty(projectId))
+projectId = "IgniteTests24Java8";
 
 Review comment:
   Probably we can create method returning default suite for a server. 
Something similar to recently merged #90 and getContributionStatus() - contains 
iteration on tracked branches. We can extract it as a separate method. This 
change we can do in a standalone PR, but anyway, please consider it as well.


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712821#comment-16712821
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239798051
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/tracked/GetTrackedBranchTestResults.java
 ##
 @@ -140,4 +145,31 @@ public TestFailuresSummary 
getAllTestFailsNoCache(@Nullable @QueryParam("branch"
 
 return tbProc.getTrackedBranchTestFailures(branchOpt, checkAllLogs, 
cntLimit, creds);
 }
+
+/**
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @return Mutes for given server-project pair.
+ */
+@GET
+@Path("mutes")
+public Set mutes(
+@Nullable @QueryParam("serverId") String srvId,
+@Nullable @QueryParam("projectId") String projectId
+) {
+ICredentialsProv creds = ICredentialsProv.get(req);
+
+if (F.isEmpty(srvId))
+srvId = "apache";
 
 Review comment:
   Avoid hardcoding. At least use constants - we have method retuning default 
server ID.


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712816#comment-16712816
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239796897
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,154 @@
+/*
+ * 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.tcmodel.mute;
 
 Review comment:
   Please place compacted objects related to Ignite storage to package 
org.apache.ignite.ci.teamcity.ignited.mute but not in package with TC XML models


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712814#comment-16712814
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239796518
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/TeamcityIgnitedImpl.java
 ##
 @@ -550,8 +581,51 @@ private void sheduleResyncBuildRefs() {
  *
  */
 void fullReindex() {
-buildRefSync.runActualizeBuildRefs(srvNme, true, null, conn);
+buildRefSync.runActualizeBuildRefs(srvName, true, null, conn);
 }
 
 
+/**
+ * Refresh mutes for given project.
+ *
+ * @param projectId Project id.
+ * @return Message with loading result.
+ */
+protected String actualizeMuteRefs(String projectId) {
 
 Review comment:
   I suggest moving this actualization outside of TC Ignited class to avoid 
creating a god object in future. We can name it MuteSync or something like that.


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712805#comment-16712805
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239795307
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,154 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.ignite.ci.tcmodel.result.tests.TestRef;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * @see MuteInfo
+ */
+public class MuteInfoCompacted {
+/** Mute id. */
+int id;
+
+/** Assignment. Mute date. */
+int muteDate;
+
+/** Assignment. Text. */
+int text;
+
+/** Scope. */
+MuteScopeCompacted scope;
+
+/** Target. Test ids. */
+long[] testIds;
+
+/** Target. Test names. */
+int[] testNames;
+
+/** Target. Test hrefs. */
+int[] testHrefs;
+
+/**
+ * @param mute Mute to compact.
+ * @param comp Compactor.
+ */
+MuteInfoCompacted(MuteInfo mute, IStringCompactor comp) {
+id = mute.id;
+
+muteDate = comp.getStringId(mute.assignment.muteDate);
+text = comp.getStringId(mute.assignment.text);
+
+scope = new MuteScopeCompacted(mute.scope, comp);
+
+List tests = mute.target.tests;
+
+if (F.isEmpty(tests))
+return;
+
+testIds = new long[tests.size()];
+testNames = new int[tests.size()];
+testHrefs = new int[tests.size()];
+
+for (int i = 0; i < tests.size(); i++) {
+TestRef test = tests.get(i);
+
+testIds[i] = Long.valueOf(test.id);
+testNames[i] = comp.getStringId(test.name);
+testHrefs[i] = comp.getStringId(test.href);
 
 Review comment:
   Can we generate href during uncompression of entity? Probably concatenating 
ITeamcityConn.host()+"tests" +testId


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712800#comment-16712800
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239794609
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,154 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.ignite.ci.tcmodel.result.tests.TestRef;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * @see MuteInfo
+ */
+public class MuteInfoCompacted {
+/** Mute id. */
+int id;
+
+/** Assignment. Mute date. */
+int muteDate;
+
+/** Assignment. Text. */
+int text;
+
+/** Scope. */
+MuteScopeCompacted scope;
+
+/** Target. Test ids. */
+long[] testIds;
+
+/** Target. Test names. */
+int[] testNames;
+
+/** Target. Test hrefs. */
+int[] testHrefs;
+
+/**
+ * @param mute Mute to compact.
+ * @param comp Compactor.
+ */
+MuteInfoCompacted(MuteInfo mute, IStringCompactor comp) {
+id = mute.id;
+
+muteDate = comp.getStringId(mute.assignment.muteDate);
 
 Review comment:
   leak of strings ID allocation is possible with each mute


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712797#comment-16712797
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239794453
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfo.java
 ##
 @@ -0,0 +1,74 @@
+/*
+ * 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.tcmodel.mute;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ *
+ */
+@XmlRootElement(name = "mute")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class MuteInfo {
+/** Id. */
+@XmlAttribute public int id;
+
+/** Assignment. */
+@XmlElement public MuteAssignment assignment;
+
+/** Scope. */
+@XmlElement public MuteScope scope;
+
+/** Target. */
+@XmlElement public MuteTarget target;
+
+/** {@inheritDoc} */
+@Override public boolean equals(Object o) {
+if (this == o)
+return true;
+
+if (o == null || getClass() != o.getClass())
+return false;
+
+MuteInfo info = (MuteInfo)o;
+
+if (id != info.id)
+return false;
+
+if (assignment != null ? !assignment.equals(info.assignment) : 
info.assignment != null)
+return false;
+
+if (scope != null ? !scope.equals(info.scope) : info.scope != null)
+return false;
+
+return target != null ? target.equals(info.target) : info.target == 
null;
+}
+
+/** {@inheritDoc} */
+@Override public int hashCode() {
 
 Review comment:
I suggest using autogen hashcode: 
   @Override public int hashCode() {
   return Objects.hashCode(login, avatarUrl);
   }


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712793#comment-16712793
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239794124
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,154 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.ignite.ci.tcmodel.result.tests.TestRef;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * @see MuteInfo
+ */
+public class MuteInfoCompacted {
+/** Mute id. */
+int id;
+
+/** Assignment. Mute date. */
+int muteDate;
 
 Review comment:
   I suggest to use long with parsed timestamp


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712685#comment-16712685
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

SomeFire commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239773819
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,162 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.ignite.ci.tcmodel.conf.Project;
+import org.apache.ignite.ci.tcmodel.result.tests.TestRef;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * @see MuteInfo
+ */
+public class MuteInfoCompacted {
+/** Mute id. */
+int id;
+
+/** Assignment. Mute date. */
+int muteDate;
+
+/** Assignment. Text. */
+int text;
+
+/** Scope. Project id. */
+int projectId;
+
+/** Scope. Project name. */
+int projectName;
+
+/** Target. Test ids. */
+long[] testIds;
+
+/** Target. Test names. */
+int[] testNames;
+
+/** Target. Test hrefs. */
+int[] testHrefs;
+
+/**
+ * @param mute Mute to compact.
+ * @param comp Comparator.
+ */
+MuteInfoCompacted(MuteInfo mute, IStringCompactor comp) {
+id = mute.id;
+
+muteDate = comp.getStringId(mute.assignment.muteDate);
+text = comp.getStringId(mute.assignment.text);
+
+projectId = comp.getStringId(mute.scope.project.id);
 
 Review comment:
   Done.


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712516#comment-16712516
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

SomeFire commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239737389
 
 

 ##
 File path: ignite-tc-helper-web/src/test/resources/mutes.xml
 ##
 @@ -0,0 +1,3 @@
+20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-1090http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-4931http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300ticket
 IGNITE-5956 createdhttp://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-601http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-807http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-5518http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300IGNITE-5959http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-4210http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-1757http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300Ticket
 exists.http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-584http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-1094http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-5841http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-5495http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-795http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-809http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-1755http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-601http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-807http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300This
 test is 

[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712463#comment-16712463
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239340675
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteDao.java
 ##
 @@ -0,0 +1,127 @@
+/*
+ * 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.tcmodel.mute;
+
+import com.google.common.base.Preconditions;
+import java.util.HashSet;
+import java.util.Set;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.ci.db.TcHelperDb;
+import org.apache.ignite.ci.di.AutoProfiling;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ *
+ */
+public class MuteDao {
+/** Cache name */
+public static final String TEAMCITY_MUTE_CACHE_NAME = "teamcityMute";
+
+/** Ignite provider. */
+@Inject private Provider igniteProvider;
+
+/** Builds cache. */
+private IgniteCache muteCache;
+
+/** Compactor. */
+@Inject private IStringCompactor compactor;
+
+/**
+ *
+ */
+public void init() {
+muteCache = 
igniteProvider.get().getOrCreateCache(TcHelperDb.getCacheV2Config(TEAMCITY_MUTE_CACHE_NAME));
+}
+
+/**
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build id.
+ */
+@AutoProfiling
+public Mutes getMutes(int srvIdMaskHigh, String projectId) {
+Preconditions.checkNotNull(muteCache, "init() was not called");
+
+MutesCompacted compacted = 
muteCache.get(projectIdToCacheKey(srvIdMaskHigh, projectId));
+
+return compacted != null ? compacted.toMutes(compactor) : new Mutes();
+}
+
+/**
+ * Combine server and project into key for storage.
+ *
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build type id.
+ * @return Key from server-project pair.
+ */
+public static long projectIdToCacheKey(long srvIdMaskHigh, String 
projectId) {
+return (long)projectId.hashCode() | srvIdMaskHigh << 32;
+}
+
+/**
+ * Save small part of loaded mutes.
+ *
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @param chunk Chunk.
+ */
+public void saveChunk(int srvId, String projectId, Set chunk) {
+if (F.isEmpty(chunk))
+return;
+
+long key = projectIdToCacheKey(srvId, projectId);
+MutesCompacted compacted = muteCache.get(key);
+Mutes mutes;
+
+if (compacted == null)
+mutes = new Mutes(chunk);
+else {
+mutes = compacted.toMutes(compactor);
+
+mutes.add(chunk);
+}
+
+muteCache.put(key, new MutesCompacted(mutes, compactor));
+}
+
+/**
+ * Check that mutes for specified poject are downloaded from specified 
server.
+ *
+ * @param srvId Server id.
+ * @param projectId Project id.
+ */
+public boolean projectExists(int srvId, String projectId) {
+return muteCache.containsKey(projectIdToCacheKey(srvId, projectId));
+}
+
+/**
+ * Replace current chached mutes by fresh data.
 
 Review comment:
   ```suggestion
* Replace current cached mutes by fresh data.
   ```


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>

[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712465#comment-16712465
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239347577
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MutesCompacted.java
 ##
 @@ -0,0 +1,62 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ * @see Mutes
+ */
+public class MutesCompacted {
+/** Mutes. */
+private Set mutes;
+
+/**
+ * @param mutes Mutes.
+ * @param comp Comparator.
 
 Review comment:
   ```suggestion
* @param comp Compactor.
   ```


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712464#comment-16712464
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239347527
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,162 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.ignite.ci.tcmodel.conf.Project;
+import org.apache.ignite.ci.tcmodel.result.tests.TestRef;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * @see MuteInfo
+ */
+public class MuteInfoCompacted {
+/** Mute id. */
+int id;
+
+/** Assignment. Mute date. */
+int muteDate;
+
+/** Assignment. Text. */
+int text;
+
+/** Scope. Project id. */
+int projectId;
+
+/** Scope. Project name. */
+int projectName;
+
+/** Target. Test ids. */
+long[] testIds;
+
+/** Target. Test names. */
+int[] testNames;
+
+/** Target. Test hrefs. */
+int[] testHrefs;
+
+/**
+ * @param mute Mute to compact.
+ * @param comp Comparator.
+ */
+MuteInfoCompacted(MuteInfo mute, IStringCompactor comp) {
+id = mute.id;
+
+muteDate = comp.getStringId(mute.assignment.muteDate);
+text = comp.getStringId(mute.assignment.text);
+
+projectId = comp.getStringId(mute.scope.project.id);
+projectName = comp.getStringId(mute.scope.project.name);
+
+List tests = mute.target.tests;
+
+if (F.isEmpty(tests))
+return;
+
+testIds = new long[tests.size()];
+testNames = new int[tests.size()];
+testHrefs = new int[tests.size()];
+
+for (int i = 0; i < tests.size(); i++) {
+TestRef test = tests.get(i);
+
+testIds[i] = test.id;
+testNames[i] = comp.getStringId(test.name);
+testHrefs[i] = comp.getStringId(test.href);
+}
+}
+
+/**
+ * @param comp Comparator.
 
 Review comment:
   ```suggestion
* @param comp Compactor.
   ```


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712467#comment-16712467
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239365764
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,162 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.ignite.ci.tcmodel.conf.Project;
+import org.apache.ignite.ci.tcmodel.result.tests.TestRef;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * @see MuteInfo
+ */
+public class MuteInfoCompacted {
+/** Mute id. */
+int id;
+
+/** Assignment. Mute date. */
+int muteDate;
+
+/** Assignment. Text. */
+int text;
+
+/** Scope. Project id. */
+int projectId;
+
+/** Scope. Project name. */
+int projectName;
+
+/** Target. Test ids. */
+long[] testIds;
+
+/** Target. Test names. */
+int[] testNames;
+
+/** Target. Test hrefs. */
+int[] testHrefs;
+
+/**
+ * @param mute Mute to compact.
+ * @param comp Comparator.
+ */
+MuteInfoCompacted(MuteInfo mute, IStringCompactor comp) {
+id = mute.id;
+
+muteDate = comp.getStringId(mute.assignment.muteDate);
+text = comp.getStringId(mute.assignment.text);
+
+projectId = comp.getStringId(mute.scope.project.id);
 
 Review comment:
   NPE with mute ids: 6919, 6916, 6911 and etc. MuteScope have no project, only 
buildTypes


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712472#comment-16712472
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239351168
 
 

 ##
 File path: ignite-tc-helper-web/src/test/resources/mutes.xml
 ##
 @@ -0,0 +1,3 @@
+20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-1090http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-4931http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300ticket
 IGNITE-5956 createdhttp://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-601http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-807http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-5518http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300IGNITE-5959http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-4210http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-1757http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300Ticket
 exists.http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-584http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-1094http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-5841http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-5495http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-795http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-809http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-1755http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-601http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300https://issues.apache.org/jira/browse/IGNITE-807http://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java8"/>20171215T185123+0300This
 test is 

[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712469#comment-16712469
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239341083
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteDao.java
 ##
 @@ -0,0 +1,127 @@
+/*
+ * 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.tcmodel.mute;
+
+import com.google.common.base.Preconditions;
+import java.util.HashSet;
 
 Review comment:
   ```suggestion
   ```


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712471#comment-16712471
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239348159
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,162 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.ignite.ci.tcmodel.conf.Project;
+import org.apache.ignite.ci.tcmodel.result.tests.TestRef;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * @see MuteInfo
+ */
+public class MuteInfoCompacted {
+/** Mute id. */
+int id;
+
+/** Assignment. Mute date. */
+int muteDate;
+
+/** Assignment. Text. */
+int text;
+
+/** Scope. Project id. */
+int projectId;
+
+/** Scope. Project name. */
+int projectName;
+
+/** Target. Test ids. */
+long[] testIds;
+
+/** Target. Test names. */
+int[] testNames;
+
+/** Target. Test hrefs. */
+int[] testHrefs;
+
+/**
+ * @param mute Mute to compact.
+ * @param comp Comparator.
+ */
+MuteInfoCompacted(MuteInfo mute, IStringCompactor comp) {
+id = mute.id;
+
+muteDate = comp.getStringId(mute.assignment.muteDate);
+text = comp.getStringId(mute.assignment.text);
+
+projectId = comp.getStringId(mute.scope.project.id);
+projectName = comp.getStringId(mute.scope.project.name);
+
+List tests = mute.target.tests;
+
+if (F.isEmpty(tests))
+return;
+
+testIds = new long[tests.size()];
+testNames = new int[tests.size()];
+testHrefs = new int[tests.size()];
+
+for (int i = 0; i < tests.size(); i++) {
+TestRef test = tests.get(i);
+
+testIds[i] = test.id;
+testNames[i] = comp.getStringId(test.name);
+testHrefs[i] = comp.getStringId(test.href);
+}
+}
+
+/**
+ * @param comp Comparator.
+ * @return Exctracted mute.
 
 Review comment:
   ```suggestion
* @return Extracted mute.
   ```


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712470#comment-16712470
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239347749
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,162 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.ignite.ci.tcmodel.conf.Project;
+import org.apache.ignite.ci.tcmodel.result.tests.TestRef;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * @see MuteInfo
+ */
+public class MuteInfoCompacted {
+/** Mute id. */
+int id;
+
+/** Assignment. Mute date. */
+int muteDate;
+
+/** Assignment. Text. */
+int text;
+
+/** Scope. Project id. */
+int projectId;
+
+/** Scope. Project name. */
+int projectName;
+
+/** Target. Test ids. */
+long[] testIds;
+
+/** Target. Test names. */
+int[] testNames;
+
+/** Target. Test hrefs. */
+int[] testHrefs;
+
+/**
+ * @param mute Mute to compact.
+ * @param comp Comparator.
 
 Review comment:
   ```suggestion
* @param comp Compactor.
   ```


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712468#comment-16712468
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239347659
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MutesCompacted.java
 ##
 @@ -0,0 +1,62 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ * @see Mutes
+ */
+public class MutesCompacted {
+/** Mutes. */
+private Set mutes;
+
+/**
+ * @param mutes Mutes.
+ * @param comp Comparator.
+ */
+public MutesCompacted(Mutes mutes, IStringCompactor comp) {
+this(mutes.getMutesNonNull(), comp);
+}
+
+/**
+ * @param infos Mute infos.
+ * @param comp Comparator.
+ */
+public MutesCompacted(Set infos, IStringCompactor comp) {
+mutes = new HashSet<>(U.capacity(infos.size()));
+
+for (MuteInfo info : infos)
+mutes.add(new MuteInfoCompacted(info, comp));
+}
+
+/**
+ * @param comp Comparator.
 
 Review comment:
   ```suggestion
* @param comp Compactor.
   ```


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712461#comment-16712461
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239340508
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteDao.java
 ##
 @@ -0,0 +1,127 @@
+/*
+ * 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.tcmodel.mute;
+
+import com.google.common.base.Preconditions;
+import java.util.HashSet;
+import java.util.Set;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.ci.db.TcHelperDb;
+import org.apache.ignite.ci.di.AutoProfiling;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ *
+ */
+public class MuteDao {
+/** Cache name */
+public static final String TEAMCITY_MUTE_CACHE_NAME = "teamcityMute";
+
+/** Ignite provider. */
+@Inject private Provider igniteProvider;
+
+/** Builds cache. */
+private IgniteCache muteCache;
+
+/** Compactor. */
+@Inject private IStringCompactor compactor;
+
+/**
+ *
+ */
+public void init() {
+muteCache = 
igniteProvider.get().getOrCreateCache(TcHelperDb.getCacheV2Config(TEAMCITY_MUTE_CACHE_NAME));
+}
+
+/**
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build id.
+ */
+@AutoProfiling
+public Mutes getMutes(int srvIdMaskHigh, String projectId) {
+Preconditions.checkNotNull(muteCache, "init() was not called");
+
+MutesCompacted compacted = 
muteCache.get(projectIdToCacheKey(srvIdMaskHigh, projectId));
+
+return compacted != null ? compacted.toMutes(compactor) : new Mutes();
+}
+
+/**
+ * Combine server and project into key for storage.
+ *
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build type id.
+ * @return Key from server-project pair.
+ */
+public static long projectIdToCacheKey(long srvIdMaskHigh, String 
projectId) {
+return (long)projectId.hashCode() | srvIdMaskHigh << 32;
+}
+
+/**
+ * Save small part of loaded mutes.
+ *
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @param chunk Chunk.
+ */
+public void saveChunk(int srvId, String projectId, Set chunk) {
+if (F.isEmpty(chunk))
+return;
+
+long key = projectIdToCacheKey(srvId, projectId);
+MutesCompacted compacted = muteCache.get(key);
+Mutes mutes;
+
+if (compacted == null)
+mutes = new Mutes(chunk);
+else {
+mutes = compacted.toMutes(compactor);
+
+mutes.add(chunk);
+}
+
+muteCache.put(key, new MutesCompacted(mutes, compactor));
+}
+
+/**
+ * Check that mutes for specified poject are downloaded from specified 
server.
 
 Review comment:
   ```suggestion
* Check that mutes for specified project are downloaded from specified 
server.
   ```


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was 

[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712466#comment-16712466
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239347602
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MutesCompacted.java
 ##
 @@ -0,0 +1,62 @@
+/*
+ * 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.tcmodel.mute;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ * @see Mutes
+ */
+public class MutesCompacted {
+/** Mutes. */
+private Set mutes;
+
+/**
+ * @param mutes Mutes.
+ * @param comp Comparator.
+ */
+public MutesCompacted(Mutes mutes, IStringCompactor comp) {
+this(mutes.getMutesNonNull(), comp);
+}
+
+/**
+ * @param infos Mute infos.
+ * @param comp Comparator.
 
 Review comment:
   ```suggestion
* @param comp Compactor.
   ```


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712462#comment-16712462
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

zzzadruga commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239340925
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteDao.java
 ##
 @@ -0,0 +1,127 @@
+/*
+ * 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.tcmodel.mute;
+
+import com.google.common.base.Preconditions;
+import java.util.HashSet;
+import java.util.Set;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.ci.db.TcHelperDb;
+import org.apache.ignite.ci.di.AutoProfiling;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ *
+ */
+public class MuteDao {
+/** Cache name */
 
 Review comment:
   ```suggestion
   /** Cache name. */
   ```


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-10454) [TC Bot] Create page with muted tests

2018-12-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16710118#comment-16710118
 ] 

ASF GitHub Bot commented on IGNITE-10454:
-

SomeFire opened a new pull request #89: IGNITE-10454 Create page with muted 
tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89
 
 
   


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


> [TC Bot] Create page with muted tests
> -
>
> Key: IGNITE-10454
> URL: https://issues.apache.org/jira/browse/IGNITE-10454
> Project: Ignite
>  Issue Type: Task
>Reporter: Ryabov Dmitrii
>Assignee: Ryabov Dmitrii
>Priority: Major
>
> We need a page with muted tests. On this page we should have possibility to 
> filter tests by fail reason (fail with ticket link or not) and fail rate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)