forked from elixir-grpc/grpc
-
Notifications
You must be signed in to change notification settings - Fork 1
Update 0.10 #22
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
Draft
radiosilence
wants to merge
183
commits into
master
Choose a base branch
from
update-0.10
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Update 0.10 #22
Conversation
This file contains hidden or 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
* fix: use setup-beam GH action * fix: pull action from erlef
Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> closes elixir-grpc#188
* Add support for `request_id` in `GRPC.Server.Stream` * Apply suggestions from code review * chore: format * test: add tests * chore: format * chore: revert * fix: revert some more Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
* chore: update deps * chore: format * chore: format * chore: remove --warnings-as-errors from test * chore: update elixir and erlang * chore: format * chore: import config instead of use mix.config * chore: remove container in favor of setup-beam * fix: use gun 2 rc2 * chore: drop support for older OTP Co-Authored-By: David Bernheisel <david@bernheisel.com> * docs: update readme * fix: set max concurrency to lower number * import changes from elixir-grpc#202 * chore: add otp 25 to matrix * chore: exclude some combos * chore: also exclude 1.12 * fix: tls validation * chore: format Co-authored-by: David Bernheisel <david@bernheisel.com>
Use `module` instead of `atom` since the function accept module. Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
* fix: accept more combos of log level * fix: config * fix: force elixir 1.10.4 * chore: deprecate elixir 1.10
* Provide a mechanism to inject a custom status handler * Fix formatting * Fix typo * Allow status handler to be injected by configuration Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
* fix: add @impl to logger interceptor callback * refactor: make fetch opts in logger interceptor consistency * Use `[]` to get level from `opts` in `init/1`. * Use `Keyword.fetch!/2` to ensure `opts` always has `:level`. * Update lib/grpc/logger/client.ex * Update lib/grpc/logger/server.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
* apply mix format according to standard formatter * include some specs about type on status * Update lib/grpc/status.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
* chore: make protobuf optional * fix: make protobuf a test-only dep * chore: format
* Create server and client behaviours * Share types with the types of the behaviours * Add behaviours definition on test adapters * Add disconnect to behaviour definition * Split client and server domains * Replace all Keyword.get(a, b, c) with Keyword.get(a, b) || c * avoid proxy types * Add some documentation * Complete missing func implementations in test client adapter * Add parenthesis on every type definition * Replace specs with impl true on adapters implemetations * Update lib/grpc/client/adapter.ex * Update lib/grpc/client/adapter.ex * Update lib/grpc/client/adapter.ex Co-authored-by: Ricardo Antolin <ricardoAntolin@users.noreply.github.com> Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
* Running interop test with latest OTP/Elixir version when Pull Request is opened. * When merge to master branch, the CI will running interop tests for all OTP/Elixir version. Closes elixir-grpc#223 Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
Remove cron_ci.yml since we already run interop_tests every commit that merge to master branch. And remove .ci since it's no uses. In Makefile, remove cron-ci task since it's no use also.
* Revise children in HelloworldApp to use a new way of declaring supervisor. * Generate proto code with elixir-protobuf 0.10.
* Change supervisor declaration in tree. * Cleanup dependencies. * Use jason instead of poison. * Auto start server. * Move route_guide.proto to priv/protos.
* feat: improve ci and add dialyzer * fix: mix_env=test for dialyzer * fix: ci * fix: dialyzeR * chore: run fewer rounds for interop * fix: scope plt cache by otp/elixir version * fix: fallback key
* chore: bump to 0.5.0 * fix: deps declaration
* Allow to use iolists in GRPC.Message.to_data/2 * docs: document options for function * fix: dialyzer Co-authored-by: Bartosz Szafran <bartosz@shoreline.io> Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
* chore: resolve some doc warnings * chore: format * fix: supervisor call * fix: follow docs for supervisor * chore: remove un-needed opts * chore: remove inch as a dependency * chore: reduce log level in interop test * fix: define state in adapter instead * chore: suppress stdout from deps step * chore: local.hex and local.rebar * Update lib/grpc/server/supervisor.ex * fix: missing paren * fix: deal with truthy instead of boolean * refactor: lazy eval * test: add test for opts logic
* fix: avoid overriding user config if possible
* feat: make transport option replacement work
* fix: || %{}
* fix: override correctly
* docs: improve credential docs
* refactor: server and client opts * docs: add some variable names * chore: move coalesce to caller * chore: make typespect more strict * docs: add variable names * fix: test * fix: dialyzer * fix: keyword v map issues
* support grpc-web-text * enable web-text codec as default * only try to pack encoded data if codec is available * Fix! prepare decode before turning body -> message * include web-text in codec test * use bin concat operator for extracting content subtype Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * rename `pack_encoded` `prepare_decode` and make them optional * add unpack_from_channel / pack_for_channel docs * rephrase codec docs Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * set correct content-type for web codecs when using the client * add codec tests * use return_headers option on stub to assert server headers are set correctly * fetch codec from opts * run format * pack_for_channel/1 handles iodata * use Code.ensure_loaded/1 for elixir 1.11 compat * Update lib/grpc/codec/web_text.ex * Update lib/grpc/codec/web_text.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
…d-issue Fix: deprecated s.o base image for github workflows
* Detect preflight requests These typically come from grpcweb clients doing OPTIONS checks for CORS * Detect client types: grpc, grpcweb, web This replaces the `http_transcode` member of the `Server.Stream` struct as transcoding is correlated with being a web client (*not* a grpcweb client, however!) Knowing the type of client also allows for detection of when to send different types of headers, for e.g. CORS * Add a CORS header injection Interceptor It an option `:allow` option to define which origins are allowed. This may be a static string or a function which will be passed the current `req` and `stream` structs to choose what to allow. * Reintroduce the boolean http_transcode member of the Stream struct NOTE: will merge this with commit c39c834 post-review/discussion. I am leaving it as a separate commit for now for ease of continued discussion on the current PR. * web can be detected in extract_subtype * change access_type to access_mode, :web to :http_transcoding this more accurately and directly maps to the grpc terminology, and is probably clearer. * default opts to an empty list, whitespace fix * add tests for the CORS header interceptor * Assign to a temporary variable and assign that to Stream.http_transcode * provide access to request headers in the Stream object * only set cors when the sec-fetch-mode header indicates it * another test: if there is NO sec-fetch-mode header * Make access-control-allow-headers configurable, and optional Only send access-control-allow-headers when the client requests it with access-control-request-headers and allow the same configurability as access-control-allow-origin provides * align variable names with http header names * Add a CORS example to the README * format * Verbage. Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * remove default for allow_origin in CORS interceptor * raise on failed allow_origin type, and test for that * allow_origin, not allow_header * test: add missing compile-time test * chore: format readme * chore: fix Note bold * docs: cleanup readme linking * docs: proper module linking in exdoc * fix: do not use Keyword.validate due to Elixir 1.12 support --------- Co-authored-by: Adriano Santos <solid.sistemas@gmail.com> Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
* Encode protobuf to iodata for better performance * Fix warning --------- Co-authored-by: Adriano Santos <solid.sistemas@gmail.com>
Co-authored-by: Adriano Santos <adriano.santos@v3.com.br>
…eyword-validate refactor: use Keyword.validate! and bump to v0.10 and elixir 1.15
Chore/update readme
Gun passes tcp options in `gen_tcp:connect`, and tls options in `ssh:connect/2`. `ssh:connect/2` ignores the `nodelay` option.
Pass nodelay as a TCP option instead of a TLS option
* feat: added stream pipeline support * feat: add streams app example * chore: added reflection to hello streams example for easy testing * feat: added new factory function * feat: added support for header propagation * feat: added support for header propagation * chore: adjusts * feat: added new replace operator * new line * refactor: propagate context option * refactor: rename functions * refactor: removing the destructive version * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * adjusts * refactor: separating unary from non-unary * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * chore: remove reject function * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * chore: format * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * refactor: rename operator reject to via * chore: pointing flow docs * fix: correct api examples * chore: change ask and join_with apis * refactor: rename single to unary * refactor: rename single to unary in tests * chore: remove unascessary function * chore: removes a not so necessary function * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * Update lib/grpc/stream.ex Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com> * fix: format --------- Co-authored-by: Adriano Santos <solid.sistemas@gmail.com> Co-authored-by: Paulo Valente <16843419+polvalente@users.noreply.github.com>
* chore: release new version * fix: passing adapter_opts along the way * chore: better validation message * chore: update version --------- Co-authored-by: Adriano Santos <adriano.santos@v3.com.br>
- Updated to Elixir 1.15+, OTP 24+ - New dependencies: mint, telemetry, protobuf 0.14 - Kept Fresha CI workflow and grpc_fresha package name - Adapter paths changed: GRPC.Adapter.* -> GRPC.Client.Adapters.* / GRPC.Server.Adapters.* - GRPC.Error renamed to GRPC.RPCError - Added HTTP transcoding, CORS, Mint adapter support
- Remove duplicate Google.Protobuf.* modules (now in protobuf 0.14 dep) - Regenerate Google.Rpc.* pb files for protobuf 0.14 compatibility - Fix deprecated .new() calls to use struct syntax - Update tests for API changes (server_trailers/2, base64 padding) - Fix compressor test pattern match for 2-tuple response
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.
No description provided.