Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
fix/handle wrpc panic (#448)
Browse files Browse the repository at this point in the history
* fix/handle wrpc panic

* chore: bump go-wrpc
  • Loading branch information
javierguerragiraldez authored Sep 26, 2022
1 parent c1be36a commit 449b393
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/jackc/pgx/v4 v4.17.2
github.com/jeremywohl/flatten v1.0.1
github.com/kong/go-kong v0.32.0
github.com/kong/go-wrpc v0.0.0-20220713182016-0ac0ed43d830
github.com/kong/go-wrpc v0.0.0-20220926162517-2374aa556d56
github.com/kong/goks v0.5.0
github.com/kong/semver/v4 v4.0.1
github.com/mattn/go-sqlite3 v1.14.15
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -862,8 +862,8 @@ github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/kong/go-kong v0.32.0 h1:XmSWmKl5bNfcQHbmw3GBNiT7pRHbuehmeMft0Hjr63U=
github.com/kong/go-kong v0.32.0/go.mod h1:GzkYwVXXuAZwxr3K6kgAbSEkh2zBDKtliD0xIqMu/9E=
github.com/kong/go-wrpc v0.0.0-20220713182016-0ac0ed43d830 h1:KKUStSi53GgOWWnIqQx2RIYcORQX75z1t0jWTR8n4NA=
github.com/kong/go-wrpc v0.0.0-20220713182016-0ac0ed43d830/go.mod h1:y0xoS99VcKjQ7Q0p8y3ppSLIeKOF7apHLv3TdpThqnY=
github.com/kong/go-wrpc v0.0.0-20220926162517-2374aa556d56 h1:VMRlo1tRNyJnIZhS4M7tN/NKuWYNXY7tV8cgL8I2Jbg=
github.com/kong/go-wrpc v0.0.0-20220926162517-2374aa556d56/go.mod h1:y0xoS99VcKjQ7Q0p8y3ppSLIeKOF7apHLv3TdpThqnY=
github.com/kong/goks v0.5.0 h1:rTozT/Cw+eZntQ8JhZMkT1G0yGoFQowNx9drZ0OdDA8=
github.com/kong/goks v0.5.0/go.mod h1:nXZO/AF2uP/mhJV9rt8VmWEW2/XhJRfdsJ57TPSjGT8=
github.com/kong/semver/v4 v4.0.1 h1:DIcNR8W3gfx0KabFBADPalxxsp+q/5COwIFkkhrFQ2Y=
Expand Down
2 changes: 1 addition & 1 deletion internal/gen/wrpc/kong/services/config/v1/config_wrpc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions internal/server/kong/ws/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ func (n *Node) writeWRPCConfig(ctx context.Context, c config.Content, configVers
defer cancel()

cli := config_service.ConfigServiceClient{Peer: n.peer}
defer func() {
if err := recover(); err != nil {
n.Logger.Error("panic sending wrpc config", zap.Any("panic-message", err))
}
}()
out, err := cli.SyncConfig(ctx, req)
if err != nil {
n.Logger.Error("SyncConfig method failed", zap.Error(err))
Expand Down

0 comments on commit 449b393

Please sign in to comment.