RFR: 2247: When pr's headHash is missing, stop further processing

Erik Joelsson erikj at openjdk.org
Mon Apr 29 22:48:21 UTC 2024


On Mon, 29 Apr 2024 22:01:27 GMT, Zhao Song <zsong at openjdk.org> wrote:

> Kevin Rushforth found this GitLab issue few years ago.
> 
> Sometimes, pull requests in GitLab would be stuck. When it happens, it shows the number of commits as "0". Clicking on the "Changes" tab shows no diffs, and displays a warning banner: "Something went wrong on our end. Please try again!" This requires action on user's part to get them "unstuck".
> 
> In Skara side, when it happens, pull request bot would not be able to get the headHash of this pull request and then throw an exception and trigger an other round of CheckWorkItem. If the user doesn't fix it, skara bot will continuously work on the pull request.
> 
> To resolve it, we should try to make pull request bot be able to identify this situation and provide some guidance to the users.

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 436:

> 434:             String text = "The head hash of this pull request is missing.\n" +
> 435:                     "Until this is resolved, this pull request cannot be processed.\n" +
> 436:                     "Please try to use the following command to push an empty commit.\n" +

Suggestion:

                    "This is likely caused by a caching problem in the server and can usually be worked around by pushing another commit to the pull request branch. The commit can be empty. Example:\n" +

I also recommend removing all the explicit single line breaks. Single linebreaks will not be honored when formatting anyway and we don't want these sentences in separate paragraphs.

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 441:

> 439:                     "$ git push\n" +
> 440:                     "```\n" +
> 441:                     "If the issue still exists, please notify skara admins.";

Suggestion:

                    "If the issue still exists, please notify Skara admins.";

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

PR Review Comment: https://git.openjdk.org/skara/pull/1645#discussion_r1583860437
PR Review Comment: https://git.openjdk.org/skara/pull/1645#discussion_r1583859717


More information about the skara-dev mailing list