Commit Graph

250 Commits

Author SHA1 Message Date
Austin Vazquez
589a593abc
Update GitHub Actions CI to resolve deprecation warnings
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-02-29 15:28:55 +00:00
Derek McGowan
faba5896a9
Merge pull request #158 from dmcgowan/update-protobuf
Fix proto3 generation error
2024-02-21 14:10:30 -08:00
Derek McGowan
73b6a9156d Add optional feature in protobuf compiler
Fixes error "is a proto3 file that contains optional fields, but code generator protoc-gen-go-ttrpc hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional."

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-21 13:51:52 -08:00
Derek McGowan
90d421ee7e
Merge pull request #157 from mxpv/empty_payload
Fix streaming with empty payloads
2024-02-05 11:11:35 -08:00
Maksym Pavlenko
44ca0096e1 Add comment
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-03 09:50:16 -08:00
Maksym Pavlenko
6615f159ba Fix linter
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-02 12:14:32 -08:00
Maksym Pavlenko
dea99e9d05 Fix handling of empty payloads
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-02 12:10:01 -08:00
Maksym Pavlenko
336fc1b6b4 Add integration test to reproduce issue with empty payloads
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-02 10:47:36 -08:00
Derek McGowan
baadfd8e79
Merge pull request #156 from containerd/dependabot/go_modules/google.golang.org/grpc-1.57.1
Bump google.golang.org/grpc from 1.57.0 to 1.57.1
2023-10-30 08:05:53 -07:00
dependabot[bot]
1e51c4681d
Bump google.golang.org/grpc from 1.57.0 to 1.57.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.57.0 to 1.57.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.57.0...v1.57.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 15:40:27 +00:00
Derek McGowan
b6bd7ce660
Merge pull request #155 from containerd/dependabot/go_modules/golang.org/x/net-0.17.0
Bump golang.org/x/net from 0.10.0 to 0.17.0
2023-10-26 08:39:44 -07:00
dependabot[bot]
bea960d9fe
Bump golang.org/x/net from 0.10.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 22:39:50 +00:00
Fu Wei
9c0db2b1c3
Merge pull request #152 from klihub/devel/unary-interceptor-chaining
Implement support for unary interceptor chaining.
2023-09-06 09:39:17 +08:00
Krisztian Litkey
40f227ddbb server: implement UnaryServerInterceptor chaining.
Add a WithChainUnaryServerInterceptor server option to allow
using more that one server side interceptor which will then
get chained and invoked in the order given.

This should allow us to implement opentelemetry instrumentation
as interceptors while allowing users to keep intercepting their
server side calls for other reasons at the same time.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2023-08-25 15:57:58 +03:00
Krisztian Litkey
f984c9b178 client: implement UnaryClientInterceptor chaining.
Add a WithChainUnaryClientInterceptor client option to allow
using more that one client call interceptor which will then
get chained and invoked in the order given.

This should allow us to implement opentelemetry instrumentation
as interceptors while allowing users to keep intercepting their
client calls for other reasons at the same time.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2023-08-25 15:57:52 +03:00
Fu Wei
b2f0adabbf
Merge pull request #153 from klihub/fixes/UserOnCloseWait-comment
Fix grammar in comment for UserOnCloseWait.
2023-08-08 06:12:19 +08:00
Fu Wei
9287d4978d
Merge pull request #154 from liggitt/genproto
Bump genproto dependency
2023-08-08 06:11:24 +08:00
Jordan Liggitt
a2fbc14815
go.mod: google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d
Signed-off-by: Jordan Liggitt <liggitt@google.com>
2023-08-02 11:49:10 -04:00
Jordan Liggitt
cf2b85de12
go.mod: bump to supported go version
Signed-off-by: Jordan Liggitt <liggitt@google.com>
2023-08-02 10:28:33 -04:00
Krisztian Litkey
8ca4110ebc Fix comment for UserOnCloseWait.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2023-07-28 20:02:17 +03:00
Fu Wei
05e0d07d83
Merge pull request #150 from klihub/fixes/server-test/TestClientEOF
server_test: wait for OnClose in TestClientEOF.
2023-07-28 09:22:27 +08:00
Krisztian Litkey
e0cd801116 server_test: wait for OnClose in TestClientEOF.
In the test for client Call failing with ErrClosed on a closed
server, wait for the client's OnClose handler to get triggered
to make sure closing the socket had properly been administered
on the client's side. Otherwise trying a new Call() might fail
with some other error than ErrClosed, for instance ENOTCONN.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2023-07-27 17:59:04 +03:00
Fu Wei
712429a9f0
Merge pull request #151 from klihub/fixes/increase-ci-timeout
.github: give more slack for build+tests.
2023-07-25 22:06:23 +08:00
Krisztian Litkey
8d4784675e .github: give more slack for build+tests.
Increase timeout for build+run tests CI workflow
job from 5 to 10 minutes. It regularly times out
during github's busiest hours, typically either on
windows or macos workers.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2023-07-24 14:45:19 +03:00
Fu Wei
ac26f8cbea
Merge pull request #144 from Iceber/stream_recv_channel
First process the pending messages in recv channel
2023-05-09 13:11:40 +08:00
Iceber Gu
c51165f20d First process the pending messages in recv channel
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-05-09 11:40:38 +08:00
Fu Wei
0ca69a9ca2
Merge pull request #140 from dmcgowan/add-recvclose-channel
Add recvClose channel to stream
2023-05-09 11:16:40 +08:00
Derek McGowan
bba25effb1
Merge pull request #141 from austinvazquez/fix-error-check-in-server
Unwrap IO errors in server connection error handling
2023-05-08 16:38:29 -07:00
Derek McGowan
471297eed9 Add recvClose channel to stream
Prevent panic from closing recv channel, which may be written to after
close. Use a separate channel to signal recv has closed and check that
channel on read and write.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-08 12:26:34 -07:00
Austin Vazquez
9599fadcd6 Unwrap io errors in server connection receive error handling
Unwrap io.EOF and io.ErrUnexpectedEOF in the case of read message error
which would lead to leaked server connections.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2023-05-02 15:40:45 +00:00
Phil Estes
98b5f64998
Merge pull request #124 from austinvazquez/update-github-actions-workflow
Update GitHub actions CI workflow
2023-03-09 10:41:17 -05:00
Austin Vazquez
c7b5a322ed Update GitHub actions CI workflow
Update GitHub Actions runner OS from Ubuntu 18.04 to Ubuntu 22.04.
Update actions/setup-go from v2 to v3. Update Go compiler from Go 1.17
to Go 1.20. Update golangci-lint from v1.45.0 to v1.51.2 for Go 1.20
support. Remove deprecated `-i` flag from make coverage target.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2023-03-08 23:06:15 +00:00
Phil Estes
36fd7c3f33
Merge pull request #132 from austinvazquez/add-test-logging
Rework deadline assertion logging to be more clear
2023-03-08 12:46:43 -05:00
Derek McGowan
7e006e71c5
Merge pull request #130 from austinvazquez/fix-server-shutdown
Fix server shutdown logic
2023-03-08 08:17:47 -08:00
Kazuyoshi Kato
39515bd379
Merge pull request #133 from containerd/dependabot/go_modules/golang.org/x/sys-0.1.0
Bump golang.org/x/sys from 0.0.0-20210124154548-22da62e12c0c to 0.1.0
2023-03-07 12:07:26 -08:00
Austin Vazquez
19445fddca Fix server shutdown logic
Simplify close idle connections logic in server shutdown to be more
intuitive. Modify add connection logic to check if server has been
shutdown before adding any new connections. Modify test to make all
calls before server shutdown.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2023-02-27 16:45:35 +00:00
dependabot[bot]
3f862ad1f2
Bump golang.org/x/sys from 0.0.0-20210124154548-22da62e12c0c to 0.1.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20210124154548-22da62e12c0c to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 07:29:22 +00:00
Austin Vazquez
5a7c8fbf15 Rework deadline assertion logging to be more clear
Make `TestServerRequestTimeout` deadline assertion log print expected
and actual values in the same format for more clear troubleshooting.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2023-02-25 00:26:47 +00:00
Phil Estes
32fab23746
Merge pull request #128 from kzys/check-shutdown
Make checkServerShutdown verbose
2023-01-27 11:37:17 -05:00
Kazuyoshi Kato
ca27f484bd Make checkServerShutdown verbose
TestServerShutdown is often failing on Windows.
This change may help troubleshooting easier.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2023-01-27 00:02:02 +00:00
Derek McGowan
5cc9169d1f
Merge pull request #123 from darfux/fix_leak_when_conn_reset
server: Fix connection issues when receiving ECONNRESET
2022-11-09 09:51:27 -08:00
Derek McGowan
d23706a46f
Merge pull request #125 from vbatts/protobuild_link
README: protobuild is in containerd org now
2022-11-04 15:17:48 -07:00
liyuxuan.darfux
a03aa04591 server: Fix connection leak when receiving ECONNRESET
The ttrpc server somtimes receives `ECONNRESET` rather than `EOF` when
the client is exited. Such as reading from a closed connection. Handle
it properly to avoid goroutine and connection leak.

Change-Id: If32711cfc1347dd2da27ca846dd13c3f5af351bb
Signed-off-by: liyuxuan.darfux <liyuxuan.darfux@bytedance.com>
2022-11-04 13:56:29 +08:00
Vincent Batts
45ed590198
README: protobuild is in containerd org now
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-11-01 17:37:45 -04:00
Derek McGowan
89444d66c4
Merge pull request #120 from wllenyj/fix-streams
stream: fix the map of streams leak
2022-09-28 22:34:27 -07:00
Samuel Karp
9c6e106d2d
Merge pull request #122 from kzys/protobuild-fix 2022-08-30 22:54:43 -07:00
Kazuyoshi Kato
c58a8f9c28 Regenerated pb.go files to fix mismatches
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-08-30 21:17:24 +00:00
Kazuyoshi Kato
e6c17ec28a
Merge pull request #118 from ethan-lowman-dd/ethan.lowman/fix-makefile-check-protos
build: Fix references to check-protos target in Makefile
2022-08-30 13:59:30 -07:00
Kazuyoshi Kato
0ac5158442
Merge pull request #116 from dmcgowan/service-prefix
Add service prefix option to generator
2022-08-30 13:55:28 -07:00
Derek McGowan
8205afc00c Update protobuf version and add service prefix
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-07-05 23:59:44 -07:00