Releases: connectrpc/connect-go
v1.11.1
What's Changed
Bugfixes
- Prefer t.Cleanup to close test servers by @akshayjshah in #573
- Set X-User-Agent in gRPC-Web clients by @akshayjshah in #572
- Reuse buffers when marshaling in unary Connect protocol by @jhump in #561
- Eliminate preallocation for enveloped protocols by @akshayjshah in #574
Other changes
- Various docs, Makefile, and tooling cleanups by @akshayjshah and @rubensf in #554, #556, #562, #565, #567, #569, and #568
- Include Go 1.21.0 in CI by @akshayjshah in #566
Full Changelog: v1.11.0...v1.11.1
v1.11.0
What's Changed
This is the first release of Connect in the connectrpc
GitHub organization. The import path has changed to connectrpc.com/connect
.
All previous releases are available under the new import path. The code for these releases is identical to the code for github.com/bufbuild/connect-go
.
To migrate to the new import path, a shell script is usually sufficient:
On Linux, or anywhere with GNU sed
:
find . -name "*.go" -exec sed -i 's|github.com/bufbuild/connect-go|connectrpc.com/connect|g' {} \;
go get connectrpc.com/connect@latest
go mod tidy
On Mac, or anywhere with BSD sed
:
find . -name "*.go" -exec sed -i '' 's|github.com/bufbuild/connect-go|connectrpc.com/connect|g' {} \;
go get connectrpc.com/connect@latest
go mod tidy
When you change your source code, you'll also need to switch to the version of protoc-gen-connect-go
in this repository. If you're using the Buf CLI with the buf.build/bufbuild/connect-go
remote plugin, switch to the buf.build/connectrpc/go
plugin.
We apologize for any inconvenience that this rename causes. We're doing this to prepare Connect for donation to a foundation, which will put it on a better footing for long-term maintenance by multiple stakeholders.
If you encounter any problems or have questions, please reach out to us by filing an issue or joining #connectrpc
in the Gophers Slack.
Full Changelog: v1.10.0...v1.11.0
v1.10.1
v1.10.0
NOTICE: This version has been retracted due to a corruption in the global module cache. Use v1.10.1 instead.
What's Changed
Enhancements
- Add WithConditionalHandlerOptions for method-specific options by @emcfarlane in #538
Bugfixes
- Distinguish expected from unexpected EOFs by @emcfarlane in #533 and #539
- Make clients always drain stream by @emcfarlane in #536
Other changes
- Update buf studio URL in README by @pkwarren in #544
- Improve WithConditionalHandlerOptions docs by @akshayjshah in #548
Full Changelog: v1.9.0...v1.10.0
v1.9.1
v1.9.0
NOTICE: This version has been retracted due to a corruption in the global module cache. Use v1.9.1 instead.
What's Changed
Along with a few new features and bugfixes, this release includes a variety of internal performance improvements.
[v1.8.0] BenchmarkConnect/unary-12 8415 1305116 ns/op 14449031 B/op 254 allocs/op
[v1.9.0] BenchmarkConnect/unary-12 10443 1151366 ns/op 6024079 B/op 236 allocs/op
Enhancements
- Allow clients to set Host in headers by @emcfarlane in #522
- Allow Connect clients to configure max HTTP GET size by @jhump in #529
- Reduce allocations in HTTP routing by @mattrobenolt in #519
- Cache mapping of methods to protocol handlers by @emcfarlane in #525
- Improve performance of percent encoding by @emcfarlane in #531
- Reduce marshaling allocations with MarshalAppend by @emcfarlane in #503
Bugfixes
- Discard unknown JSON fields by default by @akshayjshah in #518
- Canonicalize Connect streaming trailer names by @jchadwick-buf in #528
Other changes
- Tighten internal lint checks by @zchee in #520
- Simplify code when pooled buffers aren't returned by @pkwarren in #532
New Contributors
- @zchee made their first contribution in #520
- @emcfarlane made their first contribution in #522
Full Changelog: v1.8.0...v1.9.0
v1.8.0
What's Changed
Enhancements
- Expose HTTP method of unary requests (see documentation) by @jhump and @akshayjshah in #502 and #509
- Implement
fmt.Stringer
interface for StreamType to improve debug logging by @svrana in #495
Bugfixes
- Fix documentation comments to use correct identifier name by @cuishuang in #498
- Fix Makefile quotes to handle paths with spaces by @bufdev in #508
- Always close response body in
CloseRead
by @pkwarren in #515
New Contributors
- @cuishuang made their first contribution in #498
- @svrana made their first contribution in #495
Full Changelog: v1.7.0...v1.8.0
v1.7.0
What's Changed
As of this release, the Connect protocol supports performing idempotent, side-effect free requests using HTTP GETs. This makes it easier to cache responses in the browser, on your CDN, or in proxies and other middleboxes.
Note
This functionality is only supported when using the Connect protocol—using a Connect client with a Connect server. When usinggrpc-go
clients, orconnect-go
clients configured with theWithGRPC
orWithGRPCWeb
options, all requests will continue to be HTTP POSTs.
To opt into GET support for a given Protobuf RPC, you must mark it as being side-effect free using the MethodOptions.IdempotencyLevel option:
service ElizaService {
rpc Say(stream SayRequest) returns (SayResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
}
With this schema change, handlers will automatically support both GET and POST requests for this RPC. However, clients will continue to use POST requests by default, even when GETs are possible. To make clients use GETs for side effect free RPCs, use the WithHTTPGet
option:
client := elizav1connect.NewElizaServiceClient(
http.DefaultClient,
connect.WithHTTPGet(),
)
This functionality is not yet supported by other Connect implementations (including connect-es
), but hang tight! We're working on it. For more information, please check the full documentation.
Enhancements
- Connect HTTP Get support by @jchadwick-buf in #478
- Add APIs to make and handle conditional GETs by @akshayjshah in #494
Bugfixes
Full Changelog: v1.6.0...v1.7.0
v1.6.0
What's Changed
Enhancements
- Improve comments & add procedure consts to generated code by @akshayjshah in #480
- Reduce per-call URL parsing cost by @mattrobenolt in #467
- Improve errors for outdated protobuf runtimes by @akshayjshah in #465
- Switch README to use
buf curl
by @akshayjshah in #474
Bugfixes
- Clarify purpose of handler_stream_test.go by @Hirochon in #472
- Make StreamType constants typed numerics by @jhump in #486
- Populate Spec and Peer in Client.CallServerStream by @jhump in #487
New Contributors
Full Changelog: v1.5.2...v1.6.0
v1.5.2
What's Changed
Bugfixes
- More explicit error on empty JSON bodies by @akshayjshah in #459
- Fix string casing for gRPC-Web trailers by @timostamm in #461
Full Changelog: v1.5.1...v1.5.2