RFR: 1393: PR bot fails on missing .jcheck/conf [v4]

Zhao Song zsong at openjdk.org
Fri Nov 4 16:27:07 UTC 2022


On Fri, 4 Nov 2022 16:19:53 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> SKARA-1393 describes a problem related with `.jcheck/conf` missing.
>> 
>> In this patch, when the problem happens, the author of this pull request will get instructions about how to solve this problem.
>
> Zhao Song has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
> 
>  - Merge branch 'master' into SKARA-1393
>    
>    # Conflicts:
>    #	bots/pr/src/test/java/org/openjdk/skara/bots/pr/CheckTests.java
>  - need import network

bots/pr/src/main/java/org/openjdk/skara/bots/pr/LimitedCensusInstance.java line 82:

> 80:             conf = Optional.empty();
> 81:         }
> 82:         return conf.map(JCheckConfiguration::parse);

First, when we try to read the `.jcheck/conf` from the remote repo, maybe the request will throw `uncheckedRestException`. Only when the status code is `404`, conf will be set to `Optional.empty()`, so that it will be treated as `MissingJcheckConfException` later.

bots/pr/src/main/java/org/openjdk/skara/bots/pr/LimitedCensusInstance.java line 102:

> 100:                 throw e;
> 101:             }
> 102:             throw new InvalidJCheckConfException(e);

Here, if we meet some `uncheckedRestException`, we just throw it, otherwise it will be treated as `InvalidJCheckConfException` as well.

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

PR: https://git.openjdk.org/skara/pull/1407


More information about the skara-dev mailing list