Integrated: 1433: The change of the CSR status doesn't force the CheckWorkItem to re-run the check
Guoxiong Li
gli at openjdk.java.net
Mon Jun 6 09:30:59 UTC 2022
On Sat, 28 May 2022 16:47:51 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
This pull request has now been integrated.
Changeset: 06fdf7c8
Author: Guoxiong Li <gli at openjdk.org>
URL: https://git.openjdk.java.net/skara/commit/06fdf7c8d5313ee81c5fa471d8d05267f4f02fa7
Stats: 191 lines in 6 files changed: 149 ins; 16 del; 26 mod
1433: The change of the CSR status doesn't force the CheckWorkItem to re-run the check
Reviewed-by: erikj
-------------
PR: https://git.openjdk.java.net/skara/pull/1327
More information about the skara-dev
mailing list