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

Erik Joelsson erikj at openjdk.org
Wed Nov 16 18:13:24 UTC 2022


On Wed, 16 Nov 2022 17:25:51 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> bots/pr/src/main/java/org/openjdk/skara/bots/pr/LimitedCensusInstance.java line 77:
>> 
>>> 75:             conf = Optional.of(Arrays.stream(remoteRepo.fileContents(name, ref).split("\n")).toList());
>>> 76:         } catch (NoSuchElementException ignored) {
>>> 77:             // NoSuchElementException will only work for tests
>> 
>> I'm not sure I understand this part.
>
> In real circumstance, if jcheck configuration file is missing, we will get `UncheckedRestException` with status code 404  from GitHub or GitLab. However, if the jcheck configuration file is missing in local environment, we won't get `UncheckedRestException` , instead, we will only get `NoSuchElementException`. If we don't catch this exception here, the test will not be able to continue.

Can we change `TestHostedRepository` to behave more like other remote repo implementations in this regard? It could throw UncheckedRestException with 404 if the file doesn't exist.

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

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


More information about the skara-dev mailing list