Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-08-11 13:34:05 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-09-23 10:02:55 +0300
commitde1d44320173415fcdba41a2b768b08bd6f3aa93 (patch)
tree73d69f72300b8bede5f7ab6ecda2725f4eb5610a /.golangci.yml
parent6a5cb67aae77eb8167161bb3b027defdc96caf8f (diff)
grpc: Fix missing error checks for `Serve()` function
The `grpc.Server.Serve()` function will return an error when the gRPC server has either failed unexpectedly or in case it wasn't properly shut down. We don't check this error in many places though, which both causes the errcheck linter to complain and hides issues we have with some of our test setups. Fix the missing error checks via a new `testhelper.MustServe()` helper function that does the error checking for us. This surfaces some test errors for tests that forget to shut down the server or that manually close the listener, which should be handled by gRPC itself. All of those errors are fixed while at it. Drop the corresponding linting exceptions.
Diffstat (limited to '.golangci.yml')
-rw-r--r--.golangci.yml1
1 files changed, 0 insertions, 1 deletions
diff --git a/.golangci.yml b/.golangci.yml
index cbb624eb8..73200d48e 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -70,7 +70,6 @@ linters-settings:
- (net.Listener).Close
# Serve
- (*gitlab.com/gitlab-org/gitaly/v15/internal/praefect.ServerFactory).Serve
- - (*google.golang.org/grpc.Server).Serve
- (*net/http.Server).Serve
forbidigo:
forbid: