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

Zhao Song zsong at openjdk.org
Fri Jun 16 16:05:57 UTC 2023


On Fri, 16 Jun 2023 13:09:37 GMT, Erik Joelsson <erikj 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.

Yes, it will be cheaper.  Thanks!

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

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


More information about the skara-dev mailing list