Commit Graph

68 Commits

Author SHA1 Message Date
Kevin Moore 32fbc03c63
Enable and fix pedantic v1.9 lints (#445)
Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2021-02-01 09:12:26 +01:00
Ivan Inozemtsev 1e1831a187
Migrate grpc to null safety (#432) 2021-01-29 12:40:52 +01:00
Ji Li 2584a5e536
Add XHR raw response to the GrpcError for a better debugging (#423)
Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-28 12:33:41 +01:00
Vyacheslav Egorov fbcb426f21
Make sure that grpc_web.dart builds on the Web (#427)
c48af63 accidentally introduced a dependency on VM specific libraries in the shared code

Fix envoy configuration to make sure grpcweb tests runs
2021-01-22 15:35:21 +01:00
Luis Alejandro Herrera León 93c21feb56
Prevent an exception to be thrown when a web connection stream is closed (#414) 2020-12-20 23:05:59 +01:00
Vyacheslav Egorov ed960c26c6
Avoid deprecated List() constructor. (#415)
Enable prefer_collection_literals lint.
2020-12-17 10:50:45 +01:00
Ankur Jain c48af638a5
Support message compression (#409)
* Added support for compression/decompression, which can be configured through 
  `ChannelOptions` constructor's `codecRegistry` parameter or adding the 
  `grpc-accept-encoding` to `metadata` parameter of `CallOptions` on the client 
  side and `codecRegistry` parameter to `Server` on the server side.
  Outgoing rpc can be compressed using the `compression` parameter on the 
  `CallOptions`.

Closes #6
2020-12-11 09:52:24 +01:00
Isaac Saldana 275cc544c9
Fix concurrent modification error in GrpcWebClientChannel.terminate
Fixes #331

Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2020-11-12 12:52:04 +01:00
Vyacheslav Egorov f1c475603f
Cleanups (#398)
* Regenerate protobuf files using newest protoc plugin
* Fix lints everywhere
* Remove visibleForTesting from profile.dart
2020-11-12 11:36:59 +01:00
Vyacheslav Egorov e634f9749f
Fix for duplicate headers (#397) 2020-11-12 09:51:57 +01:00
Ben Konyi b8197a5897
Add timeline logging to grpc client (#392)
Co-authored-by: Zichang Guo <zichangguo@google.com>
2020-11-11 15:51:16 +01:00
Zbigniew Mandziejewicz 8b71a9dab2
Ensure CallOptions merge preserves Web specific options 2020-11-11 15:49:39 +01:00
Lei Liu 52bea07000
Add support for unix domain sockets (#327)
Fixes #299
2020-11-11 15:43:05 +01:00
Vyacheslav Egorov 63f551b14b
Update dart.yml (#387) 2020-11-03 22:49:23 +01:00
Vyacheslav Egorov cb1c0ea8b3
Update pubspec.yaml, CHANGELOG.md and expand deprecation notice (#378)
* Opt grpc_web_server.dart out of NNBD.
2020-11-03 14:21:04 +01:00
Zbigniew Mandziejewicz 9f83e124e9
feat: support client interceptors (#338)
* Added support for client interceptors, which can be configured through
  Client constructor's interceptors parameter. Interceptors will be
  executed by Client.$createStreamingCall and Client.$createUnaryCall.
  Using interceptors requires regenerating client stubs using version 19.2.0 or
  newer of protobuf compiler plugin.
* Client.$createCall is deprecated because it does not invoke client
  interceptors.
2020-11-02 11:13:56 +01:00
Vyacheslav Egorov 7ea15a8160
Propagate cancellation from responses stream to the call (#376)
It is not enough to just cancel the subscription.

Fixes #368
2020-10-29 12:56:49 +01:00
Andrew Coutts b6e40c34e3
Add decoded grpc-status-details-bin details to GrpcError (#349)
Closes #209
2020-10-27 17:07:58 +01:00
Rui Craveiro 3d731e0690
Call to onMetadata handles exceptions (#342)
Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2020-10-26 15:39:49 +01:00
Vyacheslav Egorov 2957ec003f
Add a simple end-to-end gRPC-web test (#354)
We did not have any before which allowed for regressions like #306 to
slip through. Unfortunately we can't test gRPC-web implementation
in pure Dart because we don't have a server side implementation of
the protocol. Instead we add a dependency on the third party
gRPC-web proxy (grpcwebproxy by Improbable Engineering - the choice made
purely based on the simplicity of installation) which forwards all
request gRPC server (written in Dart).
2020-10-25 12:53:53 +01:00
Nic Hite fa6b127dca
Create gRPC servers and clients with TransportConnections. (#364)
* Create gRPC servers and clients with TransportConnections.

* switch class ordering to put base class first.
2020-10-05 19:34:39 -07:00
Vyacheslav Egorov 831f5d8cfb
Revert "Not to fail pending requests, just reschedule it (#303)" (#366)
This reverts commit 9ed03b6b96.

This change prevents client from gracefully handling connection issues and instead just makes it infinitely trying to reconnect.

Closes #339
2020-10-02 22:22:33 +02:00
Nic Hite a774583de0
Beef up exception handling in gRPC code. (#360)
* Beef up exception handling in gRPC code.

* Verify default stacktrace isn't used in exceptions
2020-09-29 01:01:18 -07:00
Nic Hite bb4eab0f1f
Add browser features to Dart gRPC-web for parity with JS implementation. (#347)
* Add bypassCorsPreflight capability to gRPC-web Dart.

* fix tests and run dartfmt.

* remove print statement

* dartfmt

* Update pubspec.

* Fix changelog.

* Fix tests

* final dartfmt

* Respond to requested changes.

* revert extra newline in changelog

Co-authored-by: Michael Thomsen <mit@google.com>
2020-09-24 21:52:35 -07:00
Vyacheslav Egorov 17a40219ba
Regenerate certificates used by tests. (#352)
Current certificates don't pass verification on Mac OS X Catalina
making it impossible to run test suite on Mac laptops.
2020-09-18 10:27:36 +02:00
Vyacheslav Egorov 3414356950
Revert "Support grpc-web in pure dart (#287)" (#351)
This reverts commit c513e1467f.

The original commit has broken streaming due to limitations of package:http.
2020-09-17 10:59:15 -07:00
Koichi Ishida e4947e2909
Encode server error message (#330) 2020-07-24 10:20:23 +02:00
Koichi Ishida 98ff843751
Decode gRPC error message (#326) 2020-07-20 16:11:19 +02:00
Oleg Maslovsky 9ed03b6b96
Not to fail pending requests, just reschedule it (#303) 2020-06-08 10:16:00 +02:00
Robson Araujo c513e1467f
Support grpc-web in pure dart (#287)
By using package:http for making connections.
2020-05-12 09:01:36 +02:00
Sigurd Meldgaard 6061512afa
Grpc-web Handle empty trailers (#247)
* Grpc-web Handle empty trailers
2019-11-07 10:52:13 +01:00
Nic Hite 7ed8b741cd
Add explicit 'localhost' to tests involving server (#242)
* Add explicit 'localhost' to tests involving server

* Bump version

* Clean up CHANGELOG

* Revert version bump.
2019-09-30 01:22:16 -07:00
Sigurd Meldgaard 7af96e5ced
Update test certificate (#241)
The old one was expired.
This one will expire in 2119 hopefully making it somebody elses problem.
2019-09-24 13:32:32 +01:00
Sigurd Meldgaard 992e2dcc29
Improve connection handling (#231)
* Improve connection handling

* Address review. Add round-trip-test
2019-08-19 15:31:16 +02:00
Sigurd Meldgaard dcac905a13
Fix interop (#207)
* Fix computation of authority
2019-06-27 14:43:15 +02:00
Sigurd Meldgaard 054ac9de3c
Fix imports (#199) 2019-06-25 13:00:58 +02:00
Sigurd Meldgaard 91564ff7aa
grpc-web support (#191)
* grpc-web support

This commits merges the grpc-web branch into master.

It is based on work by https://github.com/fuzzybinary .
2019-06-17 13:31:07 +02:00
Sigurd Meldgaard e65c52070b
Wait longer for timeout in timeout_test (#192) 2019-06-14 10:34:45 +02:00
Nic Hite c9c4e40088
Remove unnecessary 'new' and 'const' keywords. (#186) 2019-06-04 11:31:01 -07:00
Ivan c65afe9ec0 Add userAgent for ChannelOptions (#155)
Add userAgent for ChannelOptions
2019-05-28 12:31:35 +02:00
Sigurd Meldgaard 92731e1a71
Cancel `ServerHandler` when `ServerTransportConnection.incomingStreams` is closed (#164)
* Cancel ServerHandler when connection closes
2019-04-03 14:57:55 +02:00
Sigurd Meldgaard d7ae930e7f
Revert "Support grpc-web" (#159)
This reverts commit d58659507c.

Development of grpc-web will continue on the branch
https://github.com/grpc/grpc-dart/tree/grpc-web until it is ready.
2019-03-18 13:46:50 +01:00
Jeff Ward d58659507c Support grpc-web 2019-03-15 12:51:06 +01:00
Nic Hite eafca2ab28 Replace Future<Null> with Future<void>. (#146) 2019-01-03 08:13:25 +01:00
Sigurd Meldgaard c252ada1a5
Don't rely on package:test internals (#136) 2018-11-05 15:39:51 +01:00
Alexandre Ardhuin 3e3ba6682f allows async interceptors (#120)
* allows async interceptors

* prevent chunks to come before starting streaming request
2018-09-18 08:17:39 +02:00
Bob Nystrom 238fd7ec67 Finish migrating to the Dart 2 core library constants. (#101) 2018-07-19 15:16:58 +02:00
Michael Thomsen c32a9e97be
Use new Dart 2 APIs (#99)
* Upgrade to Dart 2 APIs

* Run dartfmt

* Update CHANGELOG.md

* Update pubspec.yaml
2018-07-13 12:57:18 +02:00
German Saprykin 847a3625e1 Added interceptors. (#86)
* Add draft implementation of interceptors.

* Fix review comment.

* Revert example files.

* Revert interop files.

* Revert interop files.

* Format.

* Fix typos.
2018-07-09 16:57:07 +02:00
Sigurd Meldgaard 694332921a Update test dependencies (#92)
* Update test dependencies

* Revert "Update test dependencies"

This reverts commit 86a6ae2dad.

* Update test dependencies

* Fix use of mockito when

* NOP

* Revert "NOP"

This reverts commit dec6a5a57a.

* Upgrade mockito

* Increase SDK dependency

* Increase deleay to trigger timeout

* Reintroduce include

* Relax sdk version constraint
2018-07-09 16:44:12 +02:00