RFR: 1950: Don't run the second jcheck if there is no .jcheck/conf in source branch

Erik Joelsson erikj at openjdk.org
Fri Jun 16 13:11:51 UTC 2023


On Thu, 15 Jun 2023 20:49:14 GMT, Zhao Song <zsong at openjdk.org> wrote:

> [SKARA-1937](https://bugs.openjdk.org/browse/SKARA-1937) triggered CheckWorkItem for many “ancient” prs and if the pr’s source branch doesn’t contain .jcheck/conf , it would trigger the second run of jcheck and then throw some exceptions.
> 
> In this patch, before the bot runs the second round of jcheck, it will check if .jcheck/conf exists in the "merge" branch.

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1373:

> 1371: 
> 1372:     private boolean isFileUpdated(String filename, Hash hash) throws IOException {
> 1373:         return localRepo.show(Path.of(filename), hash).isPresent() &&

We can make this check a bit cheaper by calling `!localRepo.files(hash, Path.of(filename)).isEmpty()` instead.

-------------

PR Review Comment: https://git.openjdk.org/skara/pull/1533#discussion_r1232232508


More information about the skara-dev mailing list