[GitHub] SomeFire commented on a change in pull request #38: IGNITE-9849 Remove invalid builds from the selection

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] SomeFire commented on a change in pull request #38: IGNITE-9849 Remove invalid builds from the selection

GitBox
SomeFire commented on a change in pull request #38: IGNITE-9849 Remove invalid builds from the selection
URL: https://github.com/apache/ignite-teamcity-bot/pull/38#discussion_r226610891
 
 

 ##########
 File path: ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/build/GetBuildTestFailures.java
 ##########
 @@ -185,25 +233,33 @@ public TestFailuresSummary getBuildTestFails(
 
         List<BuildStatisticsSummary> buildsStatistics = new ArrayList<>();
 
-        for (int i = 0; i < finishedBuilds.length; i++) {
-            int buildId = finishedBuilds[i];
+        String username = prov.getPrincipalId();
 
-            FullQueryParams param = new FullQueryParams();
-            param.setBuildId(buildId);
-            param.setBranch(branchName);
-            param.setServerId(srvId);
+        Set<Integer> buildIds = teamcity.getBuildConditions(username).stream()
+            .mapToInt(v -> v.buildId).boxed().collect(Collectors.toSet());
 
-            BuildStatisticsSummary buildsStatistic = updater.get(
-                BUILDS_STATISTICS_SUMMARY_CACHE_NAME, prov, param,
-                (k) -> getBuildStatisticsSummaryNoCache(srvId, buildId), false);
+        System.out.println(buildIds);
 
 Review comment:
   Use logger or remove sout.

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services