RFR: 1673: CSR bot should be able to handle a withdrawn CSR properly [v2]

Zhao Song zsong at openjdk.org
Wed Nov 16 19:38:05 UTC 2022


> A user reported that skara bot keeps changing the description in his MR.
> 
> After investigation, we found a bug related with CSR bot.
> 
> The user linked a CSR issue with the main issue, and after that, he found CSR unneeded and withdrawn the CSR issue.
> 
> However, our logic about handling withdrawn CSR issue has some problem.
> 
> In PullRequestWorkItem#run, the bot would add updateMarker() to the PR body regardless of the state of CSR issue.  And if a PR body contains the updateMarker, it will be updated periodically until the body contains a CSR progress. However, since our CSR issue is withdrawn, the CSR label would not be added to the pr and CSR progress would not be added to the PR body. So it will be an endless loop.
> 
> In summary, the bug would happen in such a case, the user withdraw the csr issue before the csr issue bot first time run.
> 
> In this patch, before the CSR Issue bot is trying to add the updateMarker, it will check the resolution of the CSR Issue first, if the CSR Issue is already withdrawn, then updateMarker would not be added to the PR body.  And PR bot would work normally.

Zhao Song has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:

 - Merge branch 'master' into SKARA-1673
   
   # Conflicts:
   #	bots/csr/src/main/java/org/openjdk/skara/bots/csr/PullRequestWorkItem.java
 - SKARA-1673

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

Changes: https://git.openjdk.org/skara/pull/1418/files
 Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1418&range=01
  Stats: 66 lines in 2 files changed: 65 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/skara/pull/1418.diff
  Fetch: git fetch https://git.openjdk.org/skara pull/1418/head:pull/1418

PR: https://git.openjdk.org/skara/pull/1418


More information about the skara-dev mailing list