RFR: 1070: An invalid /backport command target causes bot to fail endlessly

Erik Joelsson erikj at openjdk.java.net
Mon Jun 7 12:45:39 UTC 2021


On Fri, 4 Jun 2021 22:54:18 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> If a user issues a /backport command on a commit on a repository that exists, but for which we haven't properly configured backports to work (they need a fork defined where the PR can be created from), we currently end up with endless failures. This patch adds handling of the situation by printing a helpful message for the user, which also includes a list of all valid repositories.
>
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java line 113:
> 
>> 111:                 reply.print("@" + username + " [" + repoName + "](" + targetRepo.webUrl() + ") is not a valid target for backports. ");
>> 112:                 reply.print("List of valid repositories: ");
>> 113:                 reply.println(String.join(", ", bot.forkRepoNames()));
> 
> Should this be further filtered to only list repos that have the same "base" (share some commits) as the source repo? For example, if we some day configure one of the `jfx` or `jmc` update release repos to allow backport APIs, you wouldn't want to target it from a commit in the `jdk` repo, so listing those repos could be confusing. This could be done as a follow-up, since it is only a hypothetical problem for now.

I agree that it would be much better to filter the list of repos, but I'm not sure how to easily implement this. I figured this list was easily available and better than nothing.

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

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


More information about the skara-dev mailing list