4721: RB Gateway will not start, missing webhooks.json

splatter2

What version of Review Board are you running?

N/A

What version of RB Gateway are you running?

1.0, on CentOS 7.

What repository type(s) are you using?

Git

What steps will reproduce the problem?

  1. Install and configure a new RB Gateway installation.
  2. Attempt to start rb-gateway with command rb-gateway --config /path/to/config

What is the expected output? What do you see instead?

RB Gateway should start normally. I get the following error instead:

Could not create API: open /etc/rb-gateway/webhooks.json: no such file or directory

Please provide any additional information below.

I appears that rb-gateway expects the webhooks.json file to already exist. I could not find any information in the documentation (https://www.reviewboard.org/docs/rbgateway/1.0/installation/) that explained this. The only thing that the documentation mentions about the webhooks.json file is that it must point to a directory that is writable (which I am doing). It does not state anywhere that the file must already exist and/or how to populate it.

I also tried to create an empty webhooks.json file with the hope that rb-gateway would populate it, but that didn't work either.

brennie
#1 brennie

Sorry about that. We will get a patch for this out. In the meantime, if you make the contents of webhooks.json an empty JSON object (i.e. {}) that should work.

  • -New
    +Confirmed
#2 splatter2

I already tried to put an empty JSON object into webhooks.json. I get the following error when doing that:

Could not create API: json: cannot unmarshal object into Go value of type []*hooks.Webhook

Another issue I should mention is that apparently RB Gateway requires write access to the git repository in order to install a post-receive hook. This detail is not mentioned anywhere in the RB Gateway documentation.

brennie
#3 brennie

Oops, I meant to say an empty array [].

With regards to the other issue, we will update the documentation.

brennie
#4 brennie

This has been fixed in commit d056b10a7e8bffd452eb03e221569c1cc6172767 and will be included in the next release.

brennie
#5 brennie
  • -Confirmed
    +Fixed