skara
skara copied to clipboard
1618: CSR bot failed to update PR when CSR was approved
This patch fixes a mistake in the CSRBotFactory. The intention was to create one CSRIssueBot for each unique IssueProject, but we currently get one per repository instead. This is because JiraProject doesn't implement hashcode, so we can't trust a HashSet to sort out uniqueness. I'm changing this to a HashMap and using the configuration string as key instead.
For details on how this was causing the reported problem, see comments in the bug.
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
Issue
- SKARA-1618: CSR bot failed to update PR when CSR was approved
Reviewers
- Guoxiong Li (@lgxbslgx - Committer)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/skara pull/1391/head:pull/1391
$ git checkout pull/1391
Update a local copy of the PR:
$ git checkout pull/1391
$ git pull https://git.openjdk.org/skara pull/1391/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1391
View PR using the GUI difftool:
$ git pr show -t 1391
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/skara/pull/1391.diff
:wave: Welcome back erikj! 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.
But I don't think it is the root cause of SKARA-1618. The
IssueWorkItem#concurrentWith
currently only checks the issue project's name and doesn't check the issue id and repos' names so that these work items can't be run concurrently and some of them will be eliminated (Because the methodWorkItem#replaces
returnstrue
).So I suggest to file another issue to record this patch and solve SKARA-1618 by revising the method
IssueWorkItem#concurrentWith
in another patch. What is your opinion?
Good catch that the concurrentWith method is also wrong. I don't think there is any point in splitting the fixes though, I will fix that method in this change.
@erikj79 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.
:mag: 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:
1618: CSR bot failed to update PR when CSR was approved
Reviewed-by: gli, ehelin
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 1 new commit pushed to the master
branch:
- b7b4d114a01cb703f35450ffe4820ce047fd235b: 1616: Improve error message when an author isn't found in GitLab
Please see this link for an up-to-date comparison between the source branch of this pull request and the master
branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this 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.
/integrate
Going to push as commit 55084b1bc6ff1d1d3261c19347a6eb3ec120104d.
Since your change was applied there have been 3 commits pushed to the master
branch:
- 68b4f58708ef4c113a81ce38455192a692f4c86b: 1626: 8-pool records not consumed by openjdk8uX fixversions
- 4b40646da7589e3dd88e34d00112bddc3dd1428b: 1606: PullRequestPoller always processes the last updated MR for GitLab
- b7b4d114a01cb703f35450ffe4820ce047fd235b: 1616: Improve error message when an author isn't found in GitLab
Your commit was automatically rebased without conflicts.
@erikj79 Pushed as commit 55084b1bc6ff1d1d3261c19347a6eb3ec120104d.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.