Skip to content
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

Merged
merged 2 commits into from
Mar 4, 2024
Merged

sourcegraph: Remove HTTP APIs #738

merged 2 commits into from
Mar 4, 2024

Conversation

eseliger
Copy link
Member

@eseliger eseliger commented Feb 4, 2024

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?

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?
@eseliger eseliger marked this pull request as ready for review February 5, 2024 13:54
@eseliger eseliger requested review from jtibshirani, keegancsmith, ggilmore and stefanhengl and removed request for jtibshirani February 5, 2024 13:55
Copy link
Member

@keegancsmith keegancsmith left a 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{
Copy link
Member

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 {
Copy link
Member

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?

Copy link
Member Author

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?

@eseliger eseliger merged commit 371a303 into main Mar 4, 2024
8 checks passed
@eseliger eseliger deleted the es/remove-http branch March 4, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants