Commit Graph

213 Commits

Author SHA1 Message Date
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
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
Derek McGowan
1ba75c411d Add support for service prefix parameter
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-07-05 23:25:32 -07:00
Maksym Pavlenko
691908d521
Merge pull request #121 from pacoxu/patch-1
doc: ttrpc supports stream
2022-06-21 21:58:37 -07:00
Paco Xu
71c55fb753
doc: ttrpc supports stream
https://github.com/containerd/ttrpc/pull/107

Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-06-09 12:29:42 +08:00
wllenyj
660ded4433 stream: fix the map of streams leak
In a connection, streams are added only, but not deleted.
When replying to the last data, delete the stream from map.

And delete operations require concurrency.

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2022-06-07 02:26:54 +08:00
Ethan Lowman
406364be91
build: Fix references to check-protos target in Makefile
Signed-off-by: Ethan Lowman <ethan.lowman@datadoghq.com>
2022-05-24 18:00:32 -04:00
Kazuyoshi Kato
74421d1018
Merge pull request #114 from vbatts/coverage
*: remove codecov
2022-04-21 14:08:57 -07:00
Vincent Batts
9660e6b7a5
*: remove codecov
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-20 12:38:36 -04:00
Maksym Pavlenko
944ef4a40d
Merge pull request #112 from kzys/skip-empty-go-file
Only generate a Go file if the file has some services
2022-04-19 18:48:43 -07:00
Fu Wei
ad0eb6b604
Merge pull request #113 from vbatts/errors 2022-04-20 07:43:14 +08:00
Vincent Batts
6eee73df5d
*.go: organize errors to one spot
And add a little documentation.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-19 14:40:16 -04:00
Maksym Pavlenko
c0b4cc1e4a
Merge pull request #111 from vbatts/markdown_touchup
PROTOCOL: slight markdown touchup
2022-04-19 11:27:38 -07:00
Kazuyoshi Kato
f0fda535e2 Only generate a Go file if the file has some services
Otherwise, this generator creates a Go file with some import statements,
that causes "imported and not used" error.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-19 17:10:20 +00:00
Vincent Batts
f5be921aa4
PROTOCOL: slight markdown touchup
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-19 12:33:27 -04:00
Kazuyoshi Kato
62833422d7
Merge pull request #107 from dmcgowan/introduce-streaming
Introduce streaming
2022-04-18 09:41:41 -07:00
Derek McGowan
87c043efeb Remove unnecessary ttrpc plugin configuration in Protobuild.toml
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-07 17:11:40 -07:00
Derek McGowan
80efa545d4 Unwrap syscall error and check
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-07 17:11:40 -07:00
Derek McGowan
6f33ccebed Update protocol for closed data messages
Add flag to indicate that a data message used with a close flag
is not sending any data. This clears up any ambiguity over whether the
final data message is transmitting a zero length data message or no
data at all.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-07 17:11:40 -07:00
Derek McGowan
38c2a67905 Add integration test to github actions
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-07 17:11:40 -07:00
Derek McGowan
84187a847b Add integration test package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-07 17:11:40 -07:00
Derek McGowan
a323535118 Add streaming support to go-ttrpc generator
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-07 17:11:40 -07:00
Derek McGowan
86d3c77a60 Add stream tests
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-07 17:11:40 -07:00
Derek McGowan
d28bc92657 Introduce streaming to client and server
Implementation of the 1.2 protocol with support for streaming. Provides
the client and server interfaces for implementing services with
streaming.

Unary behavior is mostly unchanged and avoids extra stream tracking just
for unary calls. Streaming calls are tracked to route data to the
appropriate stream as it is received.

Stricter stream ID handling, disallowing unexpected re-use of stream
IDs.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-07 17:11:40 -07:00
Derek McGowan
bc84c40744
Merge pull request #109 from dmcgowan/update-gha
Update checkout and lint actions
2022-04-07 17:10:56 -07:00
Derek McGowan
ff1e359daa Update checkout and lint actions
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-04-07 11:56:32 -07:00
Phil Estes
b194a107f3
Merge pull request #106 from dmcgowan/update-protobuf-process
Add Makefile and update protobuf
2022-03-07 12:59:15 -05:00
Derek McGowan
f8e8cc43e6 Server test show sys error
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-03-04 18:17:11 -08:00
Derek McGowan
99a30d2437 Update github actions ci to use Makefile
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-03-04 18:17:11 -08:00
Derek McGowan
fe03193c28 Add makefile and update protoc version
Use makefile and installation script for protoc.
Update protoc version to match containerd.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-03-04 18:17:11 -08:00
Derek McGowan
cefcdeb31a
Merge pull request #102 from dmcgowan/protocol-definition
Add ttrpc protocol definition
2022-03-03 12:43:42 -08:00
Derek McGowan
30684b0d8e Add ttrpc protocol definition
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-03-02 11:42:10 -08:00
Derek McGowan
aa5c94700b
Merge pull request #105 from kzys/codecov
Enable Codecov again
2022-02-22 13:02:45 -08:00
Kazuyoshi Kato
79bcb78818 Enable Codecov again
We have lost Codecov since #101. While the main containerd repository
doesn't have that, ttrpc could have Codecov without much complications.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-02-22 18:12:17 +00:00
Derek McGowan
e35aa966f7
Merge pull request #103 from kzys/fix-windows-lint
Use CR+LF instead of LF regardless of OS
2022-02-22 09:45:16 -08:00
Kazuyoshi Kato
8fe1bd5ef2 Use CR+LF instead of LF regardless of OS
Git by default uses CR+LF on Windows, whereas gofmt always
uses LF even on Windows.

This commit lets Git uses LF on Windows.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-02-21 23:47:19 +00:00
Derek McGowan
40a76139bd
Merge pull request #104 from kzys/windows-wsarecv
Log the error's underyling errno if there is
2022-02-21 14:00:17 -08:00
Kazuyoshi Kato
44dfd7fdbd Log the error's underyling errno if there is
This test occasionally fails on Windows. This commit logs extra
information about the error to understand the situation better.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-02-21 21:33:56 +00:00
Derek McGowan
c636d0d1aa
Merge pull request #99 from kzys/bye-gogo
Use google.golang.org/protobuf instead of github.com/gogo/protobuf
2022-02-16 15:35:33 -08:00