Commit Graph

4545 Commits

Author SHA1 Message Date
Elliotte Rusty Harold 417d7700dd
deps: Update guava to 29.0 (#7079) 2020-06-03 13:48:02 -07:00
Chengyuan Zhang 26cf60d8c7
xds: no longer use existing Subchannels after xDS resource becomes unavailable (#7081)
Put Channel into TRANSIENT_FAILURE when CDS/EDS resource that is currently being watched becomes unavailable. CDS/EDS LB policies should shut down their downstream policy instances (stop using current Subchannels for new RPCs) and propagate TRANSIENT_FAILURE status to their parent policies (and may eventually to the Channel).
2020-06-02 18:51:39 -07:00
Eric Anderson 146857952c api: Remove ref to deleted InternalNotifyOnServerBuild 2020-06-02 07:28:44 -07:00
Gaurav S 6dee2b7e99
README.md: fixed broken documentation links in readme for quick-start and basics (#7078) 2020-06-01 10:25:29 -07:00
Chengyuan Zhang 40991af27c
xds: return an empty service config to Channel when the requested xDS resource does not exist (or removed) (#7077) 2020-06-01 10:24:48 -07:00
Chengyuan Zhang e5443068f6
xds: fix lint warnings (#7074) 2020-05-31 17:33:27 -07:00
Chengyuan Zhang 683eed671e
core: turn Channel into TF if resolver gives empty addresses with policy selection cannot handle it (#7073)
The original service config error handling design was unclear about the case when an updated resolution result with valid service config and empty address is returned to Channel, and the selected LB policy does not accept empty addresses. Existing implementation silently triggers resolver backoff after LB policy is changed, while leaving Channel being CONNECTING state, if there was an old service config resolved. This change converge the behaviors of whether the received service config is the first one or an update to a previous config, in both cases, Channel goes into TRANSIENT_FAILURE if the selected LB policy cannot handle empty addresses.
2020-05-29 18:23:37 -07:00
Eric Anderson 0201c5a9a7
stub: Have disableAutoRequest() on server-side
This splits server-side flow control from client-side, but tailors the API for
each case. Client-side continues having disableAutoRequestWithInitial(). While
client-side could have disableAutoRequest(), it seems like it will only rarely
be used and disableAutoRequestWithInitial(0) isn't that bad. So we leave it off
for now; we can always add it in the future.
2020-05-29 15:05:46 -07:00
ZHANG Dapeng 0cb91d97bf
xds: implement priority lb 2020-05-29 12:47:46 -07:00
sanjaypujare 62620ccd00
xds: replace generic with individual client and server SslContextProviders (#7059) 2020-05-27 12:31:54 -07:00
Jihun Cho 7d2d2ec035
core: fix PerfMark task mismatch (#7069) 2020-05-27 12:16:57 -07:00
Chengyuan Zhang 9c4fece661
xds: remove path matcher format requirements and default route requirement for routing enabled (#7063)
Remove requirement for formats of path matchers. Only require the last route to be the default route for the case when routing is disabled.
2020-05-27 10:20:31 -07:00
Jihun Cho ba09218030
doc: update protoc version requirement (#7064) 2020-05-27 09:11:47 -07:00
Reginald McDonald 408136301e
netty: return status code unavailable when netty channel has unresolved InetSocketAddress (#7023) 2020-05-21 16:15:53 -07:00
ZHANG Dapeng 97112b223f
compiler: support proto3 field presence for codegen
Support proto3 field presence #7051.

This is the same change as https://github.com/grpc/grpc/pull/22998/files#diff-6c29ff8771ae54ddf2c14e2ef3eb554fR37-R44
2020-05-21 15:39:10 -07:00
Nicholas Titcombe 3601190143
netty: use getOrCreate() for new instances of ChannelLogger AttributeKey. (#7048) 2020-05-21 12:43:35 -07:00
ZHANG Dapeng 0d6546719a
all: bump protobuf to 3.12.0
Version 3.12.0 is needed for the feature of support for proto3 field presence #7051
2020-05-20 16:30:59 -07:00
Esun Kim c7e8990cbb
alts: Explicit buffer management to avoid too many ShortBufferException
To avoid having too many ShortBufferException thrown in ALTS code path on Java 8, we came up with this workaround creating new managed buffer, filling it, and passing it to underlying Conscrypt not to hit the code path throwing the exception. This might look to introduce another inefficiency but it's more like making it explicit because Conscrypt will do for non-managed buffer which gRPC uses.

Fix: #6761
2020-05-20 08:59:40 -07:00
Chengyuan Zhang d667a67d15
Start 1.31.0 development cycle (#7050) 2020-05-19 16:46:16 -07:00
Chengyuan Zhang a86fc47c04
xds: change route data validation logic (#7047)
Changed the logic of parsing Route to skip Routes with action that specifies cluster_header. Eliminate unnecessary validation logic in XdsClientImpl, of which is already covered in converters.
2020-05-18 16:23:25 -07:00
Chengyuan Zhang 02e3c00c39
xds: add more route matching types in converted Route data structure (#7031)
Parse other matcher types (e.g., header matchers, runtime fraction matchers, etc) that xDS Route supports.
2020-05-18 11:47:37 -07:00
sanjaypujare efa9cf6798
xds: provide fallback protocol negotiator (#7040) 2020-05-18 10:30:13 -07:00
AgentK d89dd2db33
netty: log SocketExceptions at FINE, too
This PR changes the `NettyServerTransport#getLogLevel` method to log 
`SocketException`s to `LogLevel.FINE`, rather than exclusively pure
IOExceptions. This may fix an unintentional regression introduced in
c166ec2c, although the message in my java version (14.0.1) wouldn't have
passed the old logic for quieting either. This also fixes the issue
raised in #6423 that was locked for inactivity.

This fixes 
```
[2020/05/14 20:21:52   INFO] [io.grpc.netty.NettyServerTransport.connections] Transport failed
java.net.SocketException: Connection reset
        at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:345)
        at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:376)
        at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
        at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1125)
        at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:832)
```
being logged to level INFO, which occurs whenever a socket is improperly 
closed by the client, such as with the grpc-health-probe (They've got an
[open issue](https://github.com/grpc-ecosystem/grpc-health-probe/issues/34)
for this)
2020-05-15 15:31:35 -07:00
Jihun Cho 4a80b42118
rls: update proto (#7046) 2020-05-15 12:27:05 -07:00
Ran c5740f893c
Stub: add an util method for setting StubType. (#7045) 2020-05-15 11:45:17 -07:00
Jongho Jeon 6b9cd6d6ed
grpc-context: name Context#key(name) parameter more clearly
Motivated by #7024
2020-05-13 13:35:17 -07:00
Philippe Laflamme cc2d376a93
interop-testing: adds assertions to empty_stream test case (#7030)
If the server fails (e.g.: with an unimplemented status), the test still succeeds.
This change adds assertions to check the status code as well as the expected number of responses.
2020-05-12 17:44:09 -07:00
ZHANG Dapeng f9353e09c5
xds: fix lint 2020-05-12 16:51:24 -07:00
Eric Anderson b1ca6e8d27 Automate release process for example-hostname 2020-05-12 14:30:27 -07:00
Jihun Cho 1c50bcafd5
netty: enable auto flow control tuning by default (#7015) 2020-05-11 16:38:58 -07:00
ZHANG Dapeng 7b3b9a2fdb
grpc-all: use api configuration for dependencies
Use `api` configuration instead of `implementation` for grpc-all to avoid breaking users.
2020-05-11 09:48:33 -07:00
ZHANG Dapeng 61938bd032
xds: rename experimental routing flag to GRPC_XDS_EXPERIMENTAL_ROUTING 2020-05-08 16:15:12 -07:00
Kun Zhang 96a32ed768
core/doc: clarify when ClientCall.cancel() can be called.
The original javadoc may be misunderstood as "one must call
halfClose() before calling cancel()".
2020-05-07 18:41:22 -07:00
Jihun Cho e7d6b5f808
rls: add bazel build (#7019) 2020-05-07 17:59:47 -07:00
sanjaypujare 67cc3172f1
xds: replace deprecated fields for Upstream and Downstream TlsContext (#7010) 2020-05-07 16:01:04 -07:00
Jihun Cho 6cde3b220b
all: fix lint warnings (#7016) 2020-05-07 15:43:53 -07:00
Eric Anderson 29725bb298 README.md: Include annotations api dep in code snippets
We include this dep in our examples, but never mentioned it in the README.
Instead of getting into details about what it's for, the brief comment should
avoid most confusion for existing Java 8 users about why it appears to be
unnecessary.
2020-05-07 15:13:02 -07:00
Jihun Cho 190ab88400
examples: update xds example readme (#7017) 2020-05-07 13:24:30 -07:00
Jihun Cho 24823c741f
stub: default impl for disableAutoRequestWithInitial(int) (#7018) 2020-05-07 12:47:28 -07:00
Jihun Cho 73d35e336e
rls: add internal api to provide default cachnig client builder for testing (#7014) 2020-05-06 14:11:22 -07:00
Jihun Cho e62148f85d
rls: remove internal package (#7013) 2020-05-06 11:21:21 -07:00
Reginald McDonald 16b6145064
inprocess,core: add ability to pass status cause to client
Closes #5439
2020-05-06 11:08:15 -07:00
DRayX a9250c1f99
stub: Add disableAutoRequestWithInitial that disables all automatic inbound flow-control requests
Add a new disableAutoRequest method that disables all automatic requests while disableAutoInboundFlowControl maintains existing behavior.

The default behavior of requesting initial messages is applied even if disableAutoInboundFlowControl is called. ServerCalls disables all automatic flow control which is much more useful in case the user can't handle incoming messages until some time after the call has started.  This change creates a new StartableListener that has an onStart method that is invoked when the call is started which makes initial requests if necessary.

See #6806
2020-05-06 10:19:41 -07:00
Jihun Cho 0057c4f29d
rls: temporarily disable lb test until fixed (#7011) 2020-05-05 18:05:23 -07:00
Jihun Cho 86fc047966
rls: add internal package description (#7009) 2020-05-05 17:06:12 -07:00
apolcyn 79b00d266e
interop testing: add a gRPCLB fallback test client
This is a java analogue of the C++ test added in grpc/grpc#19623.

Proto changes were synced from grpc/grpc-proto

This client is suitable for testing fallback with any "grpclb" load-balanced service, but is particularly meant to implement a set of test cases described in an internal doc titled "DirectPath Cloud-to-Prod End-to-End Test Cases", section "gRPC DirectPath-to-CFE fallback".
2020-05-05 14:22:25 -07:00
Jihun Cho 8b914ee114
rls: add guava dependency (#7008) 2020-05-05 13:53:08 -07:00
Jihun Cho 8e8477704a
rls: generate rls coverage (#7004) 2020-05-05 10:11:33 -07:00
Jihun Cho 0515b8bed3
rls: fix resize, add some tests (#7005) 2020-05-05 10:11:12 -07:00
Jihun Cho f40af886e9
rls: add rls-exprimnetal LoadBalancer (#6998) 2020-05-04 18:05:19 -07:00