RFR: 2552: Followup of SKARA-2408
Erik Joelsson
erikj at openjdk.org
Wed Aug 6 21:41:24 UTC 2025
On Tue, 5 Aug 2025 17:56:43 GMT, Zhao Song <zsong at openjdk.org> wrote:
> [SKARA-2408](https://bugs.openjdk.org/browse/SKARA-2408) is not working as expected since the first CheckWorkItem is processed before LabelerWorkItem. Therefore, the logic I added in [SKARA-2408](https://bugs.openjdk.org/browse/SKARA-2408) won't stop the bot from adding "rfr" label in the firstCheckWorkItem.
>
> Currently, If a pr is not associated with any component, the bot will
> 1. Add "rfr" label in the first CheckWorkItem
> 2. Execute the LabelerWorkItem
> 3. In the next CheckWorkItem, it will remove the "rfr" label
>
> This will cause a race between mlbridgeBot and prBot.
I saw your comment elsewhere that this had a big performance impact. Added some suggestions to alleviate that.
bots/pr/src/main/java/org/openjdk/skara/bots/pr/LabelerWorkItem.java line 125:
> 123: if (bot.labelConfiguration().allowed().isEmpty()) {
> 124: bot.setAutoLabelled(pr);
> 125: return List.of(CheckWorkItem.fromWorkItemWithForceUpdate(bot, prId, errorHandler, triggerUpdatedAt));
We shouldn't need to rerun CheckWorkItem here.
bots/pr/src/main/java/org/openjdk/skara/bots/pr/LabelerWorkItem.java line 136:
> 134: if (manuallyAdded.size() > 0 || manuallyRemoved.size() > 0) {
> 135: bot.setAutoLabelled(pr);
> 136: return List.of(CheckWorkItem.fromWorkItemWithForceUpdate(bot, prId, errorHandler, triggerUpdatedAt));
For the rest of these, they are only needed if the PR doesn't have `rfr` I think.
-------------
PR Review: https://git.openjdk.org/skara/pull/1728#pullrequestreview-3094394293
PR Review Comment: https://git.openjdk.org/skara/pull/1728#discussion_r2258368581
PR Review Comment: https://git.openjdk.org/skara/pull/1728#discussion_r2258375062
More information about the skara-dev
mailing list