asfgit closed pull request #18: IGNITE-9541 Hotfix for old cache URL: https://github.com/apache/ignite-teamcity-bot/pull/18
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): 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 33497bb..837a9dc 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 @@ -443,50 +443,59 @@ private boolean isHistoryAgeLessThanSecs(SuiteInBranch key, int seconds, Expirab idUntil = idUntil == -2 ? buildRefs.size() - 1 : idUntil; } - if (idSince == -1 || idUntil == -1) - return Collections.emptyList(); - else if (idSince == -3 || idUntil == -3) { + if (idSince == -3 || idUntil == -3) { AtomicBoolean stopFilter = new AtomicBoolean(); AtomicBoolean addBuild = new AtomicBoolean(); - return buildRefs.stream() - .filter(b -> { - if (stopFilter.get()) - return addBuild.get(); - - Build build = getBuild(b.href); - - if (build == null || build.isFakeStub()) - return false; + return buildRefs.stream() + .filter(b -> { + if (stopFilter.get()) + return addBuild.get(); - Date date = build.getFinishDate(); + Build build = getBuild(b.href); - if (sinceDate != null && untilDate != null) - return (date.after(sinceDate) || date.equals(sinceDate)) && - (date.before(untilDate) || date.equals(untilDate)); - else if (sinceDate != null) { - if (date.after(sinceDate) || date.equals(sinceDate)) { - stopFilter.set(true); - addBuild.set(true); + if (build == null || build.isFakeStub()) + return false; - return true; - } + Date date = build.getFinishDate(); - return false; - } + if (sinceDate != null && untilDate != null) + if ((date.after(sinceDate) || date.equals(sinceDate)) && + (date.before(untilDate) || date.equals(untilDate))) + return true; else { if (date.after(untilDate)) { stopFilter.set(true); addBuild.set(false); - - return false; } + return false; + } + else if (sinceDate != null) { + if (date.after(sinceDate) || date.equals(sinceDate)) { + stopFilter.set(true); + addBuild.set(true); + return true; } - }) - .collect(Collectors.toList()); - } + + return false; + } + else { + if (date.after(untilDate)) { + stopFilter.set(true); + addBuild.set(false); + + return false; + } + + return true; + } + }) + .collect(Collectors.toList()); + } + else if (idSince == -1 || idUntil == -1) + return Collections.emptyList(); else return buildRefs.subList(idSince, idUntil + 1); } ---------------------------------------------------------------- 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 With regards, Apache Git Services