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

Guoxiong Li gli at openjdk.java.net
Wed Jun 1 09:35:38 UTC 2022

> 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.


  - all: https://git.openjdk.java.net/skara/pull/1327/files
  - new: https://git.openjdk.java.net/skara/pull/1327/files/f5786490..8ce8880f

 - full: https://webrevs.openjdk.java.net/?repo=skara&pr=1327&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=skara&pr=1327&range=00-01

  Stats: 45 lines in 2 files changed: 31 ins; 0 del; 14 mod
  Patch: https://git.openjdk.java.net/skara/pull/1327.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/1327/head:pull/1327

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

More information about the skara-dev mailing list