Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1673: CSR bot should be able to handle a withdrawn CSR properly #1418

Closed
wants to merge 2 commits into from

Conversation

zhaosongzs
Copy link
Member

@zhaosongzs zhaosongzs commented Nov 10, 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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace

Issue

  • SKARA-1673: CSR bot should be able to handle a withdrawn CSR properly

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/skara pull/1418/head:pull/1418
$ git checkout pull/1418

Update a local copy of the PR:
$ git checkout pull/1418
$ git pull https://git.openjdk.org/skara pull/1418/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1418

View PR using the GUI difftool:
$ git pr show -t 1418

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/skara/pull/1418.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 10, 2022

👋 Welcome back zsong! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title SKARA-1673 1673: CSR bot should be able to handle a withdrawn CSR properly Nov 10, 2022
@openjdk openjdk bot added the rfr label Nov 10, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 10, 2022

Webrevs

@zhaosongzs
Copy link
Member Author

/summary Co-authored-by: user1

@openjdk
Copy link

openjdk bot commented Nov 14, 2022

@zhaosongzs Invalid summary:

Co-authored-by: user1

A summary line cannot start with any of the following: <issue-id>:, Co-authored-by:, Reviewed-by:, Backport-of:. See JEP 357 for details.

@zhaosongzs
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 14, 2022

@zhaosongzs This pull request has not yet been marked as ready for integration.

@openjdk
Copy link

openjdk bot commented Nov 15, 2022

@zhaosongzs This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

🔍 One or more changes in this pull request modifies files in areas of the source code that often require two reviewers. Please consider if this is the case for this pull request, and if so, await a second reviewer to approve this pull request before you integrate it.

After integration, the commit message for the final commit will be:

1673: CSR bot should be able to handle a withdrawn CSR properly

Reviewed-by: erikj

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Nov 15, 2022
@zhaosongzs
Copy link
Member Author

/integrate

@openjdk openjdk bot added the sponsor label Nov 15, 2022
@openjdk
Copy link

openjdk bot commented Nov 15, 2022

@zhaosongzs
Your change (at version bc48679) is now ready to be sponsored by a Committer.

@erikj79
Copy link
Member

erikj79 commented Nov 16, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 16, 2022

@erikj79 @zhaosongzs Since your change was applied there have been 3 commits pushed to the master branch:

  • 371912f: 1670: Make body handling consistent in all Issue implementations
  • e127ae4: 1594: Convert rest of bots polling PRs and Issues to use new pollers
  • fbbec97: 1674: Skara bot is not closing the bug after merge request is integrated

It was not possible to rebase your changes automatically. Please merge master into your branch and try again.

# Conflicts:
#	bots/csr/src/main/java/org/openjdk/skara/bots/csr/PullRequestWorkItem.java
@openjdk openjdk bot removed the sponsor label Nov 16, 2022
@zhaosongzs
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 16, 2022

Going to push as commit fc863a2.

@openjdk openjdk bot added the integrated label Nov 16, 2022
@openjdk openjdk bot closed this Nov 16, 2022
@openjdk
Copy link

openjdk bot commented Nov 16, 2022

@zhaosongzs Pushed as commit fc863a2.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@zhaosongzs zhaosongzs deleted the SKARA-1673 branch June 9, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants