RFR: 1068: [Backport] Bot finds original commit in wrong repository
kcr at openjdk.java.net
Thu Jul 15 17:52:09 UTC 2021
On Thu, 15 Jul 2021 16:41:35 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
> When the PR bot searches for the original commit for a backport it's more or less random from which repository it will be found. Whatever it finds is posted as a link in a PR comment, and if it points to something weird, that can be confusing (though not strictly incorrect as the change will be the exact same regardless of which repo it is in).
> The search feature already has what looks to be a configurable way to limit searching to a set of organizations. Unfortunately, that feature was never used and is currently broken for Github (for Gitlab it's already in use as it's required for the search method we use). Because of this, we usually pick a match from adoptium or SAP today. This patch fixes this for Github (where the query separator is space, not '+'), and I intend to limit the organizations to "openjdk" when deploying this fix.
> In addition to this, it would be nice if the exact repo that gets picked is the "correct" one. Unfortunately, there is no really good definition of what the correct repo would be in all cases, and it would be even trickier to implement this in a good way. As an approximate workaround, I've added sorting on repository name length, so we always pick the repo with the shortest name. I believe this will at least give us a better answer than "random" in most cases for a relatively modest cost in performance.
> I have experimented with this patch in staging with the playground repo and the behavior I've seen so far is good.
It looks good. I presume you have tested it? Especially since there aren't any new unit tests added.
Marked as reviewed by kcr (Reviewer).
More information about the skara-dev