RFR: 1072: Skara should validate the commit hash of a Backport PR [v2]

Erik Joelsson erikj at openjdk.java.net
Tue Jun 8 23:18:16 UTC 2021


On Tue, 8 Jun 2021 23:15:29 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> Add a check for "Backport <hash>" titles that the given hash isn't the head of the PR itself. If the user mistakenly uses that hash, Skara is very likely to get fooled into thinking the backport is clean.
>> 
>> While investigating this, I also discovered that the CheckWorkItem was inconsistent with not repeating "backport" errors, so I implemented a general mechanism for this, which guarantees that the same exact error message is never repeated. I believe this will be good enough, and certainly better than the existing behavior.
>
> Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Check if backport hash is ancestor of PR change. Also check if a PR only contains changes already present in the target.

As we found another instance of this issue, that instance highlighted another, related, problem. If a proposed backport (or any change for that matter, but backports seem more likely) has already been done, basically making the changes in the PR redundant when merged with the target, this wasn't handled well today. I have added a check for this as well.

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

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


More information about the skara-dev mailing list