Skip to content

Fix gitolite ext svc connection

Warren Gifford requested to merge mlw-gitolite-debug into main

Created by: mollylogue

Add test to demonstrate failure scenario when using httpcli.ActorTransportOpt with httpcli.ExternalTransportOpt. Remove the use of httpcli.ActorTransportOpt for now.

The root of the problem is that we can't wrap the http.Transport multiple times, which is what we're trying to do here.

Looking into a way to add the actor transport back in without breaking things (may need @bobheadxi help), but this is the quickest fix to get the connection working for now.

It's worth noting that adding this httpcli.ExternalTransportOpt to other unit tests causes a similar breakage. It seems that if it goes before other httpcli.Opt functions, then it works fine, but if it comes after, then we see the error that looks like httpcli.ExternalTransportOpt: http.Client.Transport is not an *http.Transport: *recorder.Recorder which comes from here when we try to modify the transport, but this assumes it's a *http.Transport and it isn't.

Test plan

added unit tests. also verifying gitolite connection in local sg deployment.

Merge request reports

Loading