Commit Graph

89 Commits

Author SHA1 Message Date
Moritz 1c18e38252
Forward error (#640)
* Forward error

* Add changelog

* Switch version
2023-07-13 13:30:58 +02:00
Moritz c7e07a09a5
Fix interop tests (#651)
* Fix interop tests

* Keepalive cleanups

* Prepare for publish
2023-07-13 12:05:59 +02:00
Moritz 03f07e9535
Keepalive (#634)
* Keepalive tests run!

* Renaming

* Some refactorings

* Find a place where to handle the keepalive manager

* Fix bug

* Make KeepAliveManager independent of transport

* Fix call sites in client

* Add server keepalive handler

* Wire through onDataReceived

* Add ServerKeepAliveManager test

* Refactorings

* Tests kind of run now

* Add shutdown test

* Remove unneeded override

* Remove unneeded mocks

* Send correct error codes and cleanup

* Small changes

* Rename

* Add documentation

* Add test for !_enforcesMaxBadPings

* Refactor tests

* Switch to http2 master branch

* Renaming

* Null shutdownTimer

* Refactor to event-state model

* Smaller refactorings

* Works now

* Switch tests to isA

* Shifting things around

* Split into server and client

* Format

* rename

* Tweaks

* Switch order of optional parameters to make change non-breaking

* Add some leeway to the durations in tests

* Make keepalive tests vm only

* Switch back to onEvent in state

* Switch to published http2
2023-06-21 11:14:43 -04:00
Moritz aae487d12f
Make constructors of `GrpcError` const (#638)
* Make constructors of `GrpcError` const

* Update CHANGELOG.md

Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>

* Update pubspec.yaml

Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>

---------

Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
2023-06-21 10:48:55 -04:00
Kevin Moore 754289be88
Release v3.2.2 (#643) 2023-06-20 04:58:55 -07:00
Kevin Moore d9553ca73f
support latest pkg:protobuf (#641) 2023-06-16 22:47:03 -07:00
SeongUk Cho 1f8d992da7
Bump http version from 0.13.0 to 1.0.0 (#629) 2023-06-17 07:18:18 +10:00
Moritz 3894d5abc1
Prepare release of `3.2.0` (#637)
* Prepare release of `3.2.0`

* Add newline

* Do not change API outside of major version rev

* Change `main` to `master` in workflow

* yml -> yaml
2023-06-13 12:48:11 +02:00
Moritz f420b77a22
Switch to Dart 3 (#633)
* Switch to Dart 3

* Trying to get the new version to run

* Fix test

* Switch CI to Dart 3

* Adapt CI

* Do not run vmservice on chrome

* Typo

* Add skip to not fail on `dart test`

* Add changelog entry

* Changes as per review
2023-06-07 10:24:33 +02:00
Nate Bosch a1a8e92e38
Add a ChannelShutdownHandler callback (#620)
Add a way to react to the channel shutdown or termination with an
optional callback.

This is not necessarily the API which I would recommend, but this is the
APi that was already inappropriately shipped and in use internally.
2023-04-21 12:01:54 -07:00
Kevin Moore dbf5421eb6
Cleanup: update to and use latest pkg:lints with associated fixes (#587)
Bump min Dart SDK for grpc to 2.17
Regenerate all code
Fix generate scripts
Add dependabot
2022-10-31 11:47:31 -07:00
Vyacheslav Egorov 19ba902d7e
Add false_secrets to pubspec.yaml (#586) 2022-10-27 15:02:22 +02:00
Vyacheslav Egorov e97711aece
Prepare 3.1.0 release (#585) 2022-10-27 13:55:39 +02:00
Cobinja af965f15f7
Expose onConnectionStateChanged for channels (#565)
Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2022-08-15 15:03:51 +02:00
Vyacheslav Egorov 7cced9282a
Fix compilation with DDC (#516)
b272632450 exposed client certificate through 
`X509Certificate? get clientCertificate;` getter on `ServiceCall` class. This broke 
compilation of `grpc_web` code using DDC, but not dart2js. Turns out that dart2js is 
happy to compile any code using `dart:io` (though the result will not run if you try
to use any of those APIs), but DDC rejects such code eagerly. `package:test` runs 
tests through `dart2js` so DDC breakage was not really caught by CI. 

Unfortunately this discrepancy between DDC and dart2js puts us in some really weird 
spot: most of our tests are platform independent, but most of those tests also 
pull in `dart:io` through transitive dependencies.

This commit is the most minimal change we could make to allow the code compile both 
on the Web and natively. 

A proper fix should be to go through tests one-by-one and make sure that those that
need to run on the Web don't import `dart:io`, but we don't have time to do that 
right now. 

This commit also adds a smoke test to the CI to verify that `grpc_web` example 
builds with DDC.
2021-08-16 14:52:36 +02:00
Vyacheslav Egorov c2fb47c8a4
Prepare to release 3.0.1 (#514) 2021-08-10 12:03:14 +02:00
Kevin Moore 9a4493f934
Update dependencies (#471) 2021-04-22 14:28:30 -07:00
Kevin Moore fb0c27a78a
Require latest googleapis_auth to avoid deprecated API usage (#455) 2021-03-08 14:32:55 -08:00
Kevin Moore ee0e7ec351
Avoid completing multiplet times for one error (#454)
Also:
* updated SDK constraint to stable
* Use latest Dart action install
* Test on oldest supported SDK
2021-03-08 09:55:59 -08:00
Kevin Moore def1a19339
Prepare for stable v3 release (#452) 2021-02-11 15:36:03 -08:00
Sam Rawlins 7e8952c352
Bump mockito to breaking change with fixes (#450) 2021-02-04 09:42:29 +01:00
Kevin Moore afea2e71d8
fix spelling of repository, add missing dev_dependency on pkg:path (#449) 2021-02-01 20:43:22 +01:00
Kevin Moore 97b8e47224
Move to published, null-safey packages (#441)
* Move to published, null-safey packages

Also updated homepage -> repository

* unblocked to publish grpc!
2021-02-01 19:53:21 +01:00
Ivan Inozemtsev d7dc79971e
Update interop to null-safe grpc-dart (#448)
Also replace dependency_overrides with published versions
2021-02-01 15:38:31 +01:00
Ivan Inozemtsev 1e1831a187
Migrate grpc to null safety (#432) 2021-01-29 12:40:52 +01:00
Vyacheslav Egorov d3f0ec7f37
Release 2.9.0 (#437) 2021-01-28 13:19:14 +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
Vyacheslav Egorov 5b0e9429b8
Release 2.8.0 (#399) 2020-11-12 12:53:46 +01:00
Lei Liu 52bea07000
Add support for unix domain sockets (#327)
Fixes #299
2020-11-11 15:43:05 +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
Vyacheslav Egorov 0589503800
Bump SDK constraint and add dependency on fixnum (#377) 2020-10-30 12:04:57 +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
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
Nic Hite a657916168
Add client validation to server credentials (#363)
* Add ability to validate clients to server credentials.
2020-09-29 11:55:28 -07: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 b70f069671
Prepare to publish 2.2.3 (#355) 2020-09-21 12:18:36 +02:00
Patrice Chalin 5891eb81bb
Relax crypto version constraint (for Flutter) (#322) 2020-08-04 10:19:36 +02:00
Sigurd Meldgaard 27d9164f28
Add direct dependency to package:crypto. (#316) 2020-06-11 14:33:23 +02:00
Jonas Finnemann Jensen 449faa80ee
Added Application Default Credentials Support (#315)
* Application Default Credentials support

* Prepare a 2.2.0 release of grpc

* Update CHANGELOG.md

Co-authored-by: Sigurd Meldgaard <sigurdm@google.com>

Co-authored-by: Sigurd Meldgaard <sigurdm@google.com>
2020-06-11 14:18:30 +02:00
Sigurd Meldgaard 588c21e542
Avoid sending headers as trailers twice (#244) 2019-10-24 09:35:28 +02:00
Sigurd Meldgaard 20352dd718 Use host without port as authority when making secure connection (#238) 2019-09-09 09:41:56 +02:00
Sigurd Meldgaard b7be3af34b
Fix use of authority when making a secure connection 2019-08-22 14:26:29 +02: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 1213bc546b
Relax dependency on package:meta (#227) 2019-08-08 13:34:51 +02:00
Sigurd Meldgaard 3aeafa77cb
Improve error handling (#204)
* Improve error handling

1) Let GrpcError implement exception

As the user is (usually) expected to catch these they should implement
Exception.
There is a bigger clean-up in splitting off the GrpcError.internal as
that seems to be for invariant violations

2) Convert some thrown strings into exceptions.
2019-07-03 09:26:45 +02:00
Sigurd Meldgaard 9d2a469655
Provide scheme as part of audience (#211) 2019-06-28 15:24:59 +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