rb-gateway builds dead?

22 views
Skip to first unread message

EM W

unread,
Sep 11, 2020, 6:06:47 PM9/11/20
to Review Board Development
Hi all -

First off, I am not an experienced Go user. However, there are a couple minor changes I would like to make to our local RB Gateway, and the code seems pretty straightforward.

However, I can't seem to build rb-gateway at all, because of "dep" issues.

First, it seems like "dep" is deprecated, but I got HOL and it seems to function.

Next, the rb-gateway build is dependent on the gohg repository, but that was originally located on bitbucket.org, and that repo doesn't exist anymore. I pointed all the references to gohg in the rb-gateway source to here instead:


Next, the "dep ensure" command never succeeds anymore, it just hangs forever.

Are there any plans to modernize rb-gateway? Is this something that will be deprecated in an upcoming version of ReviewBoard?

-Ed

David Trowbridge

unread,
Sep 11, 2020, 6:08:05 PM9/11/20
to reviewb...@googlegroups.com
Ed,

We definitely should modernize the build structure. We haven't needed to make any changes to rb-gateway lately, and the go packaging world has been in a lot of flux, so I'm not surprised that it's not working right now. I'll take a look as soon as I can.

David

--

---
You received this message because you are subscribed to the Google Groups "Review Board Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard-dev/2070932c-427d-48ca-b780-59671c4bc898n%40googlegroups.com.

EM W

unread,
Sep 11, 2020, 6:41:02 PM9/11/20
to Review Board Development
I got it to work, after some messing about - my ignorance of Go is showing here. Once I corrected the references to gohg, as above, *and* I put the rb-gateway source in the actual correct path in the gopath, then I was able to "dep ensure", and run "make build"

David Trowbridge

unread,
Sep 11, 2020, 6:47:15 PM9/11/20
to reviewb...@googlegroups.com
Ed,

I believe the new go modules stuff disentangles the source a little with regards to GOPATH. It looks like that's pretty easy to migrate to, so I'll get a change in to do that soon.

If your changes are something widely useful, we'd be happy to look at integrating them into the upstream version.

David

Ed Wittmann

unread,
Sep 11, 2020, 6:58:21 PM9/11/20
to reviewb...@googlegroups.com
Hi David -

Aside from my changes to get gohg working, the only change I have currently made was two comments.

The initial invocation of "rb-gateway serve" creates some default hooks in the repository/hooks directory. This is a problem for us because we're using gitolite3 to manage hooks, and it breaks our existing hooks configuration - and we have a lot of repos.

All I did was comment two lines in commands/serve.go:

diff --git a/commands/serve.go b/commands/serve.go
index 613a332..3e4d828 100644
--- a/commands/serve.go
+++ b/commands/serve.go
@@ -16,7 +16,7 @@ func Serve(configPath string) {
 
        select {
        case cfg = <-configWatcher.NewConfig:
-               installHooks(cfg, configPath, false)
+               // installHooks(cfg, configPath, false)
                break
 
        case <-configWatcher.Errors:
@@ -98,7 +98,7 @@ func Serve(configPath string) {
 
                                // If we have any new repositories, install hooks for them.
                                // We do not need to force install because configPath has not changed.
-                               installHooks(cfg, configPath, false)
+                               //installHooks(cfg, configPath, false)
                        }
                }
        }

Perhaps not very useful to most, and kind of heavy-handed, but if you don't want the webhooks, this seems to work.

A feature request for hooks might look like an optional enablement of hooks, or if a hook install argument isn't passed, to simply assume the git repo admin is managing the hooks.

In any case, I'm up and running now. Thanks very much for the responses!

-Ed


Reply all
Reply to author
Forward
0 new messages