Age | Commit message (Collapse) | Author |
|
Update the Java gRPC implementation source to that of a released version
(v1.16.1) instead of some intermediate commit after v1.15.0.
Test: m grpc-java
Bug: 148404241
Change-Id: I9c072aee054a4aecc1bdf39adf45e9a243b907f5
|
|
Add a Soong module to build the gRPC lightweight transport library which is
based on OkHttp.
Test: m grpc-java-okhttp
Bug: 148404241
Change-Id: Ib5b6c3e29f4e791a726130117ba53c417c25a0f0
|
|
This is the first step of smoothly changing the CallCredentials API.
Security level and authority are parameters required to be passed to
applyRequestMetadata(). This change wraps them, along with
MethodDescriptor and the transport attributes to RequestInfo, which is
more clear to the implementers.
ATTR_SECURITY_LEVEL is moved to the internal GrpcAttributes and
annotated as TransportAttr, because transports are required to set it,
but no user is actually reading them from
{Client,Server}Call.getAttributes().
ATTR_AUTHORITY is removed, because no transport is overriding it.
All involved interfaces are changed to abstract classes, as this will
make further API changes smoother.
The CallCredentials name is stabilized, thus we first introduce
CallCredentials2, ask CallCredentials implementations to migrate to
it, while GRPC accepting both at the same time, then replace
CallCredentials with CallCredentials2.
|
|
issue b/116007005 for more details.
|
|
also, default log level down to INFO(closed) which is same as NettyServerTransport. (#4927)
|
|
|
|
Resolves #4135
|
|
|
|
|
|
It appears to be stable now. Ran for 1000s of times. I do see some
general flakiness in TransportTest, but it applies to the tests in
general and isn't specific to this one test. It is:
```
org.mockito.exceptions.verification.WantedButNotInvoked:
Wanted but not invoked:
listener.transportReady();
-> at io.grpc.internal.testing.AbstractTransportTest.startTransport(AbstractTransportTest.java:1815)
Actually, there were zero interactions with this mock.
```
This flake is not seen often because it occurs less frequently when
running all the tests (~.1% vs 1%). One of the early tests must warm
something up to make it less likely.
|
|
okhttp: setting acks back after apply settings before sending any data as a result of the change.
Resolves #4809 also, make #4816 the not flaky.
|
|
This is a safer way to hide the classes, because they will not appear
in public targets for some build configurations.
|
|
This is an API used to coordinate across packages and must live in
`io.grpc`.
Prepending `Internal` makes it easier to detect and hide this class
from public visibility when using certain build tools.
fixes #4796
|
|
|
|
Core and OkHttp are left with Java 6 for the moment. Once we resolve
their issues they could be bumped as well.
Updates #3961
|
|
okhttp: Implement flush coalescing.
|
|
|
|
Most of the changes are changing the signature of newClientTransport.
Since this is annoying, I choose to introduce a ClientTransportOptions
object to avoid the churn in the future.
With ClientTransportOptions in place, there's only a few lines necessary
of plumbing for the Attributes: add the field to ClientTransportOptions
and populate it in InternalSubchannel. There are no consumers of the
field in this commit.
|
|
A new RPC starts with the following steps:
1. Pick a READY transport
2. the READY transport calls `transport.newStream()`
3. the new stream calls `stream.start()`
4. `stream.start()` invokes or enqueus `writeHeaders()` (or for GET request, noop)
A racy GOAWAY could happen between 3 and 4, and by the retry spec, the RPC should be transparent-retry-able in this case. For Netty and OkHttp transport implementation, before step 4, (even if step 1, 2, and 3 excluding 4 are made atomic,) the http2-stream for the RPC is not created, so the current transparent retry logic does not apply and need fix.
Of course, if step 1, 2, and 3 including 4 are made atomic, and not with GET, there will be no such problem.
|
|
This PR adds an automatic gradle format checker and reformats all the *.gradle files. After this, new changes to *.gradle files will fail to build if not in good format, just like checkStyle failure.
|
|
|
|
Previously no transport provided the key so CallCredentials would always
see the security as NONE.
|
|
Resolves #3264
|
|
This is the same practice as #2833
|
|
Use MoreObjects.toStringHelper and use only the log id's long value,
because the class name is already present in the toStringHelper.
|
|
|
|
Pull the TLS info from the SSLSession object for TLS, and AltsContext for ALTS.
|
|
This fixes listen sockets. It is ok to have no data but report socket
options.
|
|
Address mismatch between IPv6 address hosts derived from URIs and X509 subjectAltName extensions
|
|
For okhttp, expose the standard options from the Socket object.
For netty, expose all the `io.netty.channel.ChannelOption`s of the
`channel.config()`.
|
|
|
|
|
|
|
|
|
|
This allows ProGuard to remove OkHttp's ConnectionSpec in most cases,
saving about 40 methods. The savings won't be realized until
DEFAULT_CONNECTION_SPEC is removed.
|
|
Always set the remote address, no reason why this should be a TLS-only
feature. This is needed for channelz, and is especially useful in unit
tests where we are using plaintext.
This PR adds the attr for plaintext.
|
|
|
|
|
|
Changes:
- `ClientStreamListener.onClose(Status status, RpcProgress rpcProgress, Metadata trailers)` added.
- `AbstractClientStream.transportReportStatus(Status status, RpcProgress rpcProgress, boolean stopDelivery, Metadata trailers)` added
- `ClientCallImpl.ClientStreamListenerImpl` will ignore the arg `rpcProgress` (non retry)
- `RetriableStream.SubListener` will handle `rpcProgress` and decide if transparent retry.
- `NettyClientHandler` and `OkHttpClientTransport` will pass `RpcProgress.REFUSED` to client stream listener for later stream ids when received GOAWAY, or for stream received a RST_STREAM frame with REFUSED code.
- All other files are just a result of refactoring.
|
|
ProxyDetector is now responsible for resolving the proxy's
`InetSocketAddress`, and `ProxyParameters` asserts that the address is
resolved. The results are plumbed through using a `PairSocketAddress`,
which is a special `SocketAddress`.
If a proxy should be used but the proxy can not be resolved, we the
`DnsNameResolver` will re-attempt the resolution later.
Remove the unit test testing for unresolved proxy addresses, since
it's no longer applicable.
|
|
channelz (#4194)
The channelz spec states that the two must be separate.
|
|
channelz (#4190)
Transport ststistics should really be a child member of SocketStats.
While we're at it, let's add the local and remote SocketAddress to
SocketStats, with a test.
|
|
|
|
|
|
ServerProvider (#4047)
|
|
|
|
|
|
|
|
The fixes could have subtle side-effects, but I did take care when making them.
|
|
|