RFR: 1433: The change of the CSR status doesn't force the CheckWorkItem to re-run the check [v2]

Erik Joelsson erikj at openjdk.java.net
Mon Jun 6 09:16:18 UTC 2022


On Wed, 1 Jun 2022 09:35:38 GMT, Guoxiong Li <gli at openjdk.org> wrote:

>> Hi all,
>> 
>> Currently, the CheckWorkItem of the PR bot doesn't re-run the check in the following two situations so that the message of the PR body is not updated and then confuses the developers.
>> 
>> Situation 1 steps:
>> - The issue has no csr at first
>> - Use command `/csr needed` (now the PR has `csr` label)
>> - Create a csr for this issue
>> - Then the CheckWorkItem doesn't re-run the check (Because the `csr` label is kept in the PR and no new metadata found by CheckWorkItem)
>> - (optionally) use command `/csr needed` again
>> - (optionally) then the CheckWorkItem also doesn't re-run the check
>> 
>> Situation 2 steps:
>> - The issue has no csr at first (now the PR doesn't have `csr` label)
>> - Add the new fix version to the existing approved csr. (Now the issue has the csr issue. And because this csr issue had been approved, PR also doesn't have `csr` label.)
>> - then the CheckWorkItem doesn't re-run the check (No new metadata found by CheckWorkItem)
>> - (optionally) use command `/csr needed`
>> - (optionally) then the CheckWorkItem doesn't re-run the check
>> 
>> It is because these two situations don't add or remove the `csr` label so that the `CheckWorkItem#getMetadata` doesn't return new metadata and then `CheckWorkItem#currentCheckValid` returns true and then the check doesn't re-run.
>> 
>> This patch adds a new tag/marker named `<!-- csr:` so that `CheckWorkItem#getMetadata` can generate new metadata from it. When the developers use the `/csr` command or the csr issue status has been modified, the CSRBot or CSRCommand will add the `<!-- csr:` tag to the PR body or the comment. Then the CheckWorkItem will re-run the check because `CheckWorkItem#getMetadata` meets the newly added `<!-- csr:` tag.
>> 
>> Some test cases are added or adjusted.
>> 
>> Thanks for taking the time to review.
>> 
>> Best Regards,
>> -- Guoxiong
>
> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Only check the Skara generated part. Adjust log. Avoid adding marker multiple times.

Marked as reviewed by erikj (Lead).

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

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


More information about the skara-dev mailing list