RFR: 2201: Only fetch comments once in PullRequestWorkItem in pr bot

Zhao Song zsong at openjdk.org
Mon Mar 18 18:39:11 UTC 2024


On Mon, 18 Mar 2024 18:29:27 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> In pr bot, we are still fetching comments from the remote forge instead of using the cache after [SKARA-1709](https://bugs.openjdk.org/browse/SKARA-1709).
>
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 1440:
> 
>> 1438: 
>> 1439:             // Calculate current metadata to avoid unnecessary future checks
>> 1440:             var metadata = workItem.getMetadata(workItem.getPRMetadata(censusInstance, title, updatedBody, pr.comments(), activeReviews,
> 
> This one is an actual bug. It could prevent a future run from realizing a relevant comment change took place since the last check run. It's important that the hash we save is done on the data we used when evaluating the PR. Thanks for fixing this!

Yes, it's a bug and I didn't catch it when I was implementing [SKARA-1912](https://bugs.openjdk.org/browse/SKARA-1912).

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

PR Review Comment: https://git.openjdk.org/skara/pull/1622#discussion_r1529065410


More information about the skara-dev mailing list