-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canonicalize Connect Streaming Trailer names #528
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
akshayjshah
approved these changes
Jun 21, 2023
renovate bot
referenced
this pull request
in open-feature/flagd
Jun 27, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/bufbuild/connect-go](https://togithub.com/bufbuild/connect-go) | require | minor | `v1.8.0` -> `v1.9.0` | --- ### Release Notes <details> <summary>bufbuild/connect-go (github.com/bufbuild/connect-go)</summary> ### [`v1.9.0`](https://togithub.com/bufbuild/connect-go/releases/tag/v1.9.0) [Compare Source](https://togithub.com/bufbuild/connect-go/compare/v1.8.0...v1.9.0) #### 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](https://togithub.com/emcfarlane) in [https://github.com/bufbuild/connect-go/pull/522](https://togithub.com/bufbuild/connect-go/pull/522) - Allow Connect clients to configure max HTTP GET size by [@​jhump](https://togithub.com/jhump) in [https://github.com/bufbuild/connect-go/pull/529](https://togithub.com/bufbuild/connect-go/pull/529) - Reduce allocations in HTTP routing by [@​mattrobenolt](https://togithub.com/mattrobenolt) in [https://github.com/bufbuild/connect-go/pull/519](https://togithub.com/bufbuild/connect-go/pull/519) - Cache mapping of methods to protocol handlers by [@​emcfarlane](https://togithub.com/emcfarlane) in [https://github.com/bufbuild/connect-go/pull/525](https://togithub.com/bufbuild/connect-go/pull/525) - Improve performance of percent encoding by [@​emcfarlane](https://togithub.com/emcfarlane) in [https://github.com/bufbuild/connect-go/pull/531](https://togithub.com/bufbuild/connect-go/pull/531) - Reduce marshaling allocations with MarshalAppend by [@​emcfarlane](https://togithub.com/emcfarlane) in [https://github.com/bufbuild/connect-go/pull/503](https://togithub.com/bufbuild/connect-go/pull/503) ##### Bugfixes - Discard unknown JSON fields by default by [@​akshayjshah](https://togithub.com/akshayjshah) in [https://github.com/bufbuild/connect-go/pull/518](https://togithub.com/bufbuild/connect-go/pull/518) - Canonicalize Connect streaming trailer names by [@​jchadwick-buf](https://togithub.com/jchadwick-buf) in [https://github.com/bufbuild/connect-go/pull/528](https://togithub.com/bufbuild/connect-go/pull/528) ##### Other changes - Tighten internal lint checks by [@​zchee](https://togithub.com/zchee) in [https://github.com/bufbuild/connect-go/pull/520](https://togithub.com/bufbuild/connect-go/pull/520) - Simplify code when pooled buffers aren't returned by [@​pkwarren](https://togithub.com/pkwarren) in [https://github.com/bufbuild/connect-go/pull/532](https://togithub.com/bufbuild/connect-go/pull/532) #### New Contributors - [@​zchee](https://togithub.com/zchee) made their first contribution in [https://github.com/bufbuild/connect-go/pull/520](https://togithub.com/bufbuild/connect-go/pull/520) - [@​emcfarlane](https://togithub.com/emcfarlane) made their first contribution in [https://github.com/bufbuild/connect-go/pull/522](https://togithub.com/bufbuild/connect-go/pull/522) **Full Changelog**: bufbuild/connect-go@v1.8.0...v1.9.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-feature/flagd). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDEuMyIsInVwZGF0ZWRJblZlciI6IjM1LjE0MS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
smaye81
referenced
this pull request
in connectrpc/conformance
Jun 29, 2023
This adds a new Connect server using `connect-fastify` and `connect-node`. It wires it into the docker-compose setup and allows for serving HTTP/1.1 and HTTP/2 traffic using cleartext and TLS. Fastify does not offer HTTP/3 support as of yet, so that path is not available. Note: this does not yet use TLS, but can be added as a follow-up PR. In addition, this also refactors a few things such as: * adds TypeScript support to the web portion * renames images, Dockerfiles, etc. to match the language so that adding new languages can follow one pattern. For example, `client-connect-to-server-connect-go-h2` becomes `client-connect-go-to-server-connect-go-h2` and uses `Dockerfile.crosstestgo` instead of `Dockerfile.crosstest`. * updates to connect-go v1.9.0 for https://github.com/bufbuild/connect-go/pull/528 which fixes an issue with parsing response headers from a connect-node server. * updates to connect-es v0.11.0 for connectrpc/connect-es#695, which fixes an issue with parsing response bodies for non-JSON content types.
akshayjshah
pushed a commit
that referenced
this pull request
Jul 26, 2023
After testing many approaches, I think this is the most reasonable one. At least with Go JSON, there is no reasonable approach I could find that will give better performance or memory allocation characteristics to do this in one single pass. This approach should also have a _relatively_ small impact on trailers that are already canonicalized, since they will trivially fall into the `CanonicalMIMEHeaderKey` fast-path. The impact on the response path will probably be measured in hundreds of nanoseconds to microseconds in most cases, which is not ideal, but we definitely have bigger fish to fry, and correctness is important. Closes #524.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After testing many approaches, I think this is the most reasonable one. At least with Go JSON, there is no reasonable approach I could find that will give better performance or memory allocation characteristics to do this in one single pass. This approach should also have a relatively small impact on trailers that are already canonicalized, since they will trivially fall into the
CanonicalMIMEHeaderKey
fast-path. The impact on the response path will probably be measured in hundreds of nanoseconds to microseconds in most cases, which is not ideal, but we definitely have bigger fish to fry, and correctness is important.Closes #524.