Skip to content

Commit

Permalink
Bump github.com/grpc-ecosystem/go-grpc-middleware from 1.3.0 to 1.4.0 (
Browse files Browse the repository at this point in the history
…#686)

Bumps [github.com/grpc-ecosystem/go-grpc-middleware](https://github.com/grpc-ecosystem/go-grpc-middleware) from 1.3.0 to 1.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/grpc-ecosystem/go-grpc-middleware/releases">github.com/grpc-ecosystem/go-grpc-middleware's releases</a>.</em></p>
<blockquote>
<h2>v1.4.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Do not stop retrying based on earlier good message from the stream by <a href="https://github.com/kartlee"><code>@​kartlee</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/313">grpc-ecosystem/go-grpc-middleware#313</a></li>
<li>Deprecate the server interceptor chain helpers by <a href="https://github.com/CAFxX"><code>@​CAFxX</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/423">grpc-ecosystem/go-grpc-middleware#423</a></li>
<li>Simplify chain interceptors by <a href="https://github.com/aarongable"><code>@​aarongable</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/421">grpc-ecosystem/go-grpc-middleware#421</a></li>
<li>v1: Switch from github.com/go-kit/kit to github.com/go-kit/log interfaces by <a href="https://github.com/liggitt"><code>@​liggitt</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/426">grpc-ecosystem/go-grpc-middleware#426</a></li>
<li>logging/zap/ctxzap: add caller skip to shorthand functions by <a href="https://github.com/jkawamoto"><code>@​jkawamoto</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/429">grpc-ecosystem/go-grpc-middleware#429</a></li>
<li>grpc_zap: fix caller annotation by <a href="https://github.com/jkawamoto"><code>@​jkawamoto</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/431">grpc-ecosystem/go-grpc-middleware#431</a></li>
<li>Revert verbosity level check for zap by <a href="https://github.com/central182"><code>@​central182</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/452">grpc-ecosystem/go-grpc-middleware#452</a></li>
<li>Fix memory leakage in kit.PayloadUnaryServerInterceptor by <a href="https://github.com/r3code"><code>@​r3code</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/501">grpc-ecosystem/go-grpc-middleware#501</a></li>
<li>Use strconv.FormatUint instead of fmt.Sprintf by <a href="https://github.com/andrey-berenda"><code>@​andrey-berenda</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/503">grpc-ecosystem/go-grpc-middleware#503</a></li>
<li>Fix typo in nicemd by <a href="https://github.com/andrey-berenda"><code>@​andrey-berenda</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/509">grpc-ecosystem/go-grpc-middleware#509</a></li>
<li>Fix OSX build error in outdated golang.org/x/sys dependency by <a href="https://github.com/devnev"><code>@​devnev</code></a> in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/514">grpc-ecosystem/go-grpc-middleware#514</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/aarongable"><code>@​aarongable</code></a> made their first contribution in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/421">grpc-ecosystem/go-grpc-middleware#421</a></li>
<li><a href="https://github.com/central182"><code>@​central182</code></a> made their first contribution in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/452">grpc-ecosystem/go-grpc-middleware#452</a></li>
<li><a href="https://github.com/chrisdoherty4"><code>@​chrisdoherty4</code></a> made their first contribution in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/456">grpc-ecosystem/go-grpc-middleware#456</a></li>
<li><a href="https://github.com/AmirQadir"><code>@​AmirQadir</code></a> made their first contribution in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/464">grpc-ecosystem/go-grpc-middleware#464</a></li>
<li><a href="https://github.com/AlmogBaku"><code>@​AlmogBaku</code></a> made their first contribution in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/491">grpc-ecosystem/go-grpc-middleware#491</a></li>
<li><a href="https://github.com/cuishuang"><code>@​cuishuang</code></a> made their first contribution in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/493">grpc-ecosystem/go-grpc-middleware#493</a></li>
<li><a href="https://github.com/r3code"><code>@​r3code</code></a> made their first contribution in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/501">grpc-ecosystem/go-grpc-middleware#501</a></li>
<li><a href="https://github.com/andrey-berenda"><code>@​andrey-berenda</code></a> made their first contribution in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/503">grpc-ecosystem/go-grpc-middleware#503</a></li>
<li><a href="https://github.com/steveruckdashel"><code>@​steveruckdashel</code></a> made their first contribution in <a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/pull/539">grpc-ecosystem/go-grpc-middleware#539</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/grpc-ecosystem/go-grpc-middleware/compare/v1.3.0...v1.4.0">https://github.com/grpc-ecosystem/go-grpc-middleware/compare/v1.3.0...v1.4.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/grpc-ecosystem/go-grpc-middleware/commit/d42ae9d517069c2bd7f9339147a0eafa86b3d4a3"><code>d42ae9d</code></a> v1: Mentioned v2 in README; fixed CI; removed changelog (we will use release ...</li>
<li><a href="https://github.com/grpc-ecosystem/go-grpc-middleware/commit/da1b13ec28bbdd492bdc876045791b69c4be5b81"><code>da1b13e</code></a> Update nicemd.go (<a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/issues/539">#539</a>)</li>
<li><a href="https://github.com/grpc-ecosystem/go-grpc-middleware/commit/99612e884e71d96a3c8dd30ad4d8eccacfa91798"><code>99612e8</code></a> Fix OSX build error in outdated golang.org/x/sys dependency (<a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/issues/514">#514</a>)</li>
<li><a href="https://github.com/grpc-ecosystem/go-grpc-middleware/commit/7c811bc99f5208b25d2f010022b863a00cb2a1d3"><code>7c811bc</code></a> fix typo in nicemd (<a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/issues/509">#509</a>)</li>
<li><a href="https://github.com/grpc-ecosystem/go-grpc-middleware/commit/854bd94ac7c4b4d287b9eba9b7cc4410e7215fed"><code>854bd94</code></a> use strconv.FormatUint instead of fmt.Sprintf (<a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/issues/503">#503</a>)</li>
<li><a href="https://github.com/grpc-ecosystem/go-grpc-middleware/commit/7fdae0e41d217c2e2240858a53a30c303746bf03"><code>7fdae0e</code></a> Fix memory leakage in kit.PayloadUnaryServerInterceptor (<a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/issues/501">#501</a>)</li>
<li><a href="https://github.com/grpc-ecosystem/go-grpc-middleware/commit/6aeac529d58164afc753eebf5207f08b5456a365"><code>6aeac52</code></a> fix some typos (<a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/issues/493">#493</a>)</li>
<li><a href="https://github.com/grpc-ecosystem/go-grpc-middleware/commit/68c8cdc5fd8157730d9a930d9c8b7166cfae31ac"><code>68c8cdc</code></a> Add OpenTelemetry interceptors (<a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/issues/491">#491</a>)</li>
<li><a href="https://github.com/grpc-ecosystem/go-grpc-middleware/commit/560829fc74fcf9a69b7ab01d484f8b8961dc734b"><code>560829f</code></a> Fix: middleware unary chain order (<a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/issues/464">#464</a>)</li>
<li><a href="https://github.com/grpc-ecosystem/go-grpc-middleware/commit/b6d97fab8b7d7d99cb5a9ee1ea17afbb2b12e84c"><code>b6d97fa</code></a> Improve zap grpc logger documentation on verbosity levels (<a href="https://redirect.github.com/grpc-ecosystem/go-grpc-middleware/issues/456">#456</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/grpc-ecosystem/go-grpc-middleware/compare/v1.3.0...v1.4.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/grpc-ecosystem/go-grpc-middleware&package-manager=go_modules&previous-version=1.3.0&new-version=1.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>> **Note**
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
  • Loading branch information
mergify[bot] authored May 9, 2023
2 parents 11d3703 + 6f46b9c commit 3164fc7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/go-logr/logr v1.2.4
github.com/go-logr/zapr v1.2.3
github.com/google/go-cmp v0.5.9
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/onsi/ginkgo/v2 v2.9.2
github.com/onsi/gomega v1.27.6
Expand Down
5 changes: 3 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
Expand Down Expand Up @@ -861,6 +861,7 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
Expand Down
15 changes: 10 additions & 5 deletions internal/grpcserver/grpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import (
"context"
"net"

grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
grpcprometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/pkg/errors"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
"google.golang.org/grpc"
Expand All @@ -20,15 +19,21 @@ type Registrar interface {
// SetupGRPC opens a listener and serves a given Registrar's APIs on a gRPC server and returns the listener's address or an error.
func SetupGRPC(ctx context.Context, r Registrar, listenAddr string, errCh chan<- error) (string, error) {
params := []grpc.ServerOption{
grpc_middleware.WithUnaryServerChain(grpc_prometheus.UnaryServerInterceptor, otelgrpc.UnaryServerInterceptor()),
grpc_middleware.WithStreamServerChain(grpc_prometheus.StreamServerInterceptor, otelgrpc.StreamServerInterceptor()),
grpc.ChainUnaryInterceptor(
grpcprometheus.UnaryServerInterceptor,
otelgrpc.UnaryServerInterceptor(),
),
grpc.ChainStreamInterceptor(
grpcprometheus.StreamServerInterceptor,
otelgrpc.StreamServerInterceptor(),
),
}

// register servers
s := grpc.NewServer(params...)
r.Register(s)
reflection.Register(s)
grpc_prometheus.Register(s)
grpcprometheus.Register(s)

lis, err := net.Listen("tcp", listenAddr)
if err != nil {
Expand Down

0 comments on commit 3164fc7

Please sign in to comment.