-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sourcegraph: Remove HTTP APIs #738
Conversation
We no longer serve these old HTTP APIs starting with Sourcegraph 5.3, so this code is no longer required. I hope this makes your lives a little easier by not having to maintain two code paths. If this change is annoying (because you cannot backport fixes to older versions as easily), feel free to either keep it on hold or close it. ## Test plan CI still passes, anything else I should be trying?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -108,11 +108,6 @@ var ( | |||
Help: "Number of indexed repos by code host", | |||
}) | |||
|
|||
metricNumAssigned = promauto.NewGauge(prometheus.GaugeOpts{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, seems this wasn't used. I wonder when we regressed on that.
return shouldRetry, checkErr | ||
} | ||
|
||
func newSourcegraphClient(rootURL *url.URL, hostname string, grpcClient proto.ZoektConfigurationServiceClient, opts ...SourcegraphClientOption) *sourcegraphClient { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kinda weird we pass in the rootURL but the caller of this function needs to dial grpc and pass that client in. Can we instead make it so this function does the dialing and maybe then returns an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm we can, but that makes testing a bit harder because you can't as easily feed in a mocked grpc client 🤔 WDYT about that?
We no longer serve these old HTTP APIs starting with Sourcegraph 5.3, so this code is no longer required.
I hope this makes your lives a little easier by not having to maintain two code paths.
If this change is annoying (because you cannot backport fixes to older versions as easily), feel free to either keep it on hold or close it.
Test plan
CI still passes, anything else I should be trying?