RFR: 251: Bypass PR update cache when the cooldown period expires for a bridge candidate

Erik Helin ehelin at openjdk.java.net
Fri Jan 31 13:33:12 UTC 2020


On Fri, 31 Jan 2020 12:11:55 GMT, Robin Westberg <rwestberg at openjdk.org> wrote:

> Hi all,
> 
> Please review this change that ensures that the mailing list bridge bot retries the bridge operation if it was initially delayed due to the configured cooldown period.
> 
> Best regards,
> Robin

Nice work! Couldn't `getUniqueId()` just be replaced by `pr.webUrl()`?

bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/CooldownQuarantine.java line 46:

> 45:     public synchronized boolean inQuarantine(PullRequest pr) {
> 46:         var uniqueId = getUniqueId(pr);
> 47: 

Suggestion:

        var uniqueId = pr.webUrl();

bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/CooldownQuarantine.java line 62:

> 61:     public synchronized void updateQuarantineEnd(PullRequest pr, Instant end) {
> 62:         var uniqueId = getUniqueId(pr);
> 63:         var currentEnd = quarantineEnd.getOrDefault(uniqueId, Instant.now());

Suggestion:

        var uniqueId = pr.webUrl();

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



PR: https://git.openjdk.java.net/skara/pull/388


More information about the skara-dev mailing list