Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

BB-Reviewer-Group Plugin fails to load groups from reviewers.yml

Peter Müller November 13, 2019

Hi there,

our users are facing a problem when tryin to use the bb-reviewer-groups plugin.
It seems that the plugin fails to load the group from the reviewers.yml file, but i have no idea why.

bb-reviewer-groups-fail.png

Is there a bug that breaks the plugin or are we using it wrong?
(Bitbucket Server v6.6.2)

Here's what I'm doin:

1. Create personal repository called "bb-reviewer-groups"
2. Clone the repository
3. Create reviewers.yml file a an empty folder

➜ temp git clone ssh://git@myhost.tld:7999/~b065903/bb-reviwerer-groups.git
Cloning into 'bb-reviwerer-groups'...
warning: You appear to have cloned an empty repository.

➜ temp cd bb-reviwerer-groups

➜ bb-reviwerer-groups git:(master) vi reviewers.yml

➜ bb-reviwerer-groups git:(master) ✗ cat reviewers.yml
architects:
members:
- B065903
- B040299

➜ bb-reviwerer-groups git:(master) ✗ mkdir test

➜ bb-reviwerer-groups git:(master) ✗ touch test/.keep

4. Commit and push

➜ bb-reviwerer-groups git:(master) ✗ git status
On branch master

No commits yet

Untracked files:
(use "git add <file>..." to include in what will be committed)

reviewers.yml
test/

nothing added to commit but untracked files present (use "git add" to track)

➜ bb-reviwerer-groups git:(master) ✗ git add --all

➜ bb-reviwerer-groups git:(master) ✗ git commit -m "initial commit"
[master (root-commit) ec1852b] initial commit
2 files changed, 4 insertions(+)
create mode 100644 reviewers.yml
create mode 100644 test/.keep

➜ bb-reviwerer-groups git:(master) git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 352 bytes | 352.00 KiB/s, done.
Total 5 (delta 0), reused 0 (delta 0)
To ssh://myhost.tld:7999/~b065903/bb-reviwerer-groups.git
* [new branch] master -> master

5. Create and checkout a new branch and add a empty file
6. Commit and push these changes

➜ bb-reviwerer-groups git:(master) git checkout -b feature/foobar
Switched to a new branch 'feature/foobar'

➜ bb-reviwerer-groups git:(feature/foobar) touch test/file.txt

➜ bb-reviwerer-groups git:(feature/foobar) ✗ git add --all

➜ bb-reviwerer-groups git:(feature/foobar) ✗ git commit -m "add file"
[feature/foobar 4d94411] add file
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test/file.txt

➜ bb-reviwerer-groups git:(feature/foobar) git push --set-upstream origin feature/foobar
Enter passphrase for key '/Users/b065903/.ssh/id_rsa':
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 332 bytes | 332.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote:
remote: Create pull request for feature/foobar:
remote: https://myhost.tld/users/b065903/repos/bb-reviwerer-groups/pull-requests?create&sourceBranch=refs/heads/feature/foobar
remote:
To ssh://myhost.tld:7999/~b065903/bb-reviwerer-groups.git
* [new branch] feature/foobar -> feature/foobar
Branch 'feature/foobar' set up to track remote branch 'feature/foobar' from 'origin'.

7. Open the url to create a new pull request in the bitbucket server ui
8. Create the pull request (feature/foobar -> master)

Now when i check the server logs i see a stacktrace that the plugin fails to load the groups from the reviewers.yml, but i have no idea why:

2019-11-13 11:42:45,954 ERROR [AtlassianEvent::thread-2] B065903 @Y3RMEEx702x966386x1 1cbup48 xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx "POST /users/b065903/repos/reviewer-test/pull-requests HTTP/1.1" c.a.s.i.e.AsyncBatchingInvokersTransformer There was an exception thrown trying to dispatch event 'com.atlassian.bitbucket.event.pull.PullRequestOpenedEvent[source=com.atlassian.stash.internal.pull.DefaultPullRequestService@6c9ecf5d]' for the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.shipit.impl.PullRequestReviewerServiceImpl.onPullRequestOpen(com.atlassian.bitbucket.event.pull.PullRequestOpenedEvent), listener=com.atlassian.shipit.impl.PullRequestReviewerServiceImpl@509975fe} (monitored)'
java.lang.RuntimeException: Listener: com.atlassian.shipit.impl.PullRequestReviewerServiceImpl event: com.atlassian.bitbucket.event.pull.PullRequestOpenedEvent
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:52)
at com.atlassian.diagnostics.internal.platform.event.EventSystemMonitor.invokeMonitored(EventSystemMonitor.java:109)
at com.atlassian.diagnostics.internal.platform.event.MonitoredListenerInvoker.invoke(MonitoredListenerInvoker.java:38)
at com.atlassian.stash.internal.event.AsyncBatchingInvokersTransformer$AsyncInvokerBatch.invoke(AsyncBatchingInvokersTransformer.java:111)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:34)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at com.atlassian.stash.internal.event.EventThreadFactory.lambda$createThread$0(EventThreadFactory.java:24)
at java.lang.Thread.run(Thread.java:748)
... 1 frame trimmed
Caused by: java.lang.NullPointerException: null
at com.atlassian.shipit.impl.ReviewerGroupServiceImpl.getGroups(ReviewerGroupServiceImpl.java:74)
at com.atlassian.shipit.impl.ReviewerGroupServiceImpl.getGroupsFromMaster(ReviewerGroupServiceImpl.java:55)
at com.atlassian.shipit.impl.PullRequestReviewerServiceImpl.addReviewers(PullRequestReviewerServiceImpl.java:103)
at com.atlassian.shipit.impl.PullRequestReviewerServiceImpl.onPullRequestOpen(PullRequestReviewerServiceImpl.java:70)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
... 9 common frames omitted

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events