Commit Graph

3727 Commits

Author SHA1 Message Date
Chengyuan Zhang e281c75b2a
cronet: update README for using published grpc-cronet with play service Cronet implementation (#6178)
* cronet: update README for using published grpc-cronet with play service Cronet implementation.

* doc: Added cronet/README.md version update to RELEASING.md.
2019-09-24 13:24:59 -07:00
ZHANG Dapeng f9ba620309
xds: shade gogoproto 2019-09-24 09:52:03 -07:00
ZHANG Dapeng 5bc1309c87
xds: Priority failover
- Implementing priority failover
- Removed `localityWeight` field from `LocalityLbInfo` because this is always available and up to date in `edsResponsLocalityInfo`, otherwise need to create a new instance of `LocalityLbInfo` each time weight is updated.
- Introduced `PriorityManager` that manages all the priority failover logic.
2019-09-23 18:32:43 -07:00
ZHANG Dapeng cd8dbd306b
xds: use PGV dependency from maven artifact
Resolves #6016
2019-09-23 18:09:38 -07:00
Eric Anderson 2902a9373c gradle: Use absolute path with checkstyle fileTree
The fileTree is supposed to be relative to the current project, which in
this case would be the child project, but apparently it isn't. Poked
around but couldn't find out why. In any case this fixes a regression
introduced in 4215b80b where checkstyle would no longer file any Java
files and thus it would not notice any failures.
2019-09-23 13:06:01 -07:00
ZHANG Dapeng 1f3931b3c8
xds: restructure XdsLoadBalancer Part 3: LookasideLb 2019-09-23 11:07:50 -07:00
ZHANG Dapeng 4db1c893f8
xds: restructure XdsLoadBalancer Part 2: FallbackLb 2019-09-23 11:07:24 -07:00
Chengyuan Zhang 65321b5a67
xds: implement bootstrapping for xDS load balancer for alpha release (#6145)
* Defined a proto message that maps the bootstrap JSON file for convenient parsing purpose.

* Implemented a Bootstrapper class which reads a local bootstrap file.

* Added unit test for Bootstrapper.

* Let xDS load balancer bootstrap from a bootstrap file. Currently not use configurations from bootstrap in xDS communication as the xDS load balancer implementation is undergoing changes. We will integrate it later.

* Added newline at the end of files.

* Added json_name proto field option.

* Replaced all RuntimeException with IOException for bootstrap data errors.

* Changed to use JUnit exception rules in test.

* Use StandardCharSets.UTF_8

* Revert "Let xDS load balancer bootstrap from a bootstrap file. Currently not use configurations from bootstrap in xDS communication as the xDS load balancer implementation is undergoing changes. We will integrate it later."

This reverts commit 37200cdd3c.

* Use initialization-on-demand holder idiom for instantiating Bootstrapper instance.

* Fixed usage of JUnit exception rules.

* Changed lazily instantiated variable to camel case

* Removed unnecessary constructor.
2019-09-22 16:49:09 -07:00
Srini Polavarapu fe77496f76
Update governance, contributing, code of conduct docs (#6171)
* change from Inc. to LLC for Google and update the list

* Add CODE-OF-CONDUCT.md, GOVERNANCE.md and update CONTRIBUTING.md
2019-09-20 16:28:42 -07:00
Jihun Cho 16392bc733
netty: converts Proxy handler into new protocol negotiation style (#6159) 2019-09-19 15:29:03 -07:00
ZHANG Dapeng 19b09160c9
all: stabilize ManagedChannelBuilder.usePlaintext() 2019-09-18 15:16:31 -07:00
ZHANG Dapeng a04ad90888
examples: clarify about potential mistake in unit test
Resolves #6161
2019-09-18 13:24:56 -07:00
Anar Sultanov ba0fd84d79 netty: Rely on ChannelFactory in NettyServer instead of dynamic classes
Fixes #5649
2019-09-17 15:59:29 -07:00
sanjaypujare fd4f189d2b
Create a new class XdsAttributes in xds to house XDS related attributes and define ATTR_SDS_CONFIG there (#6154)
Need to define a new attribute so we can plumb SdsSecretConfig from the xDS LB to SSL code so the value can be passed on to the SDS module.
2019-09-17 11:01:45 -07:00
Jihun Cho df4da6bef3
auth: removed unused import (#6155) 2019-09-16 15:48:56 -07:00
ZHANG Dapeng 4334583681
xds: restructure XdsLoadBalancer part 1
- Get rid of `XdsLbState` and make config change handling into two layers: `LookasideLb` (handles balancer name) and `LookasideChannelLb` (handles child policy), under `XdsLoadBalanecer` (fallback manager layer)
- Move `XdsComms`/`AdsStream` to a layer under `LookasideChannelLb`. They don't keep the helper, but only `SyncCtx` and `ChannelLogger`
- For each layer, we pass in a `LoadBalancer.Factory` for the next/child layer. In test, 
  + we mock/fake the factory, so we don't care about the implementation details of the child layer.
  + we capture the helper of `factory.newBalancer(factory)`, so we can mimic `updateBalancingState() `from the child layer.

Part 1 contains fallback management logic. There is no change in fallback management logic.
2019-09-13 12:11:27 -07:00
Elliotte Rusty Harold 858a1f8fb9 Update to Guava 28.1
Remove serviceAccountWithScopeNotToJwt as test no longer makes sense
and it is hard to adapt to the new cred API.
2019-09-13 11:16:08 -07:00
Eric Anderson 2b945774b6 Apply animalsniffer plugin explicitly when needed 2019-09-13 09:42:17 -07:00
Eric Anderson 4215b80b81 Apply java plugin explicitly when needed 2019-09-13 09:42:17 -07:00
Eric Anderson e13221b503 Apply japicmp plugin explicitly when needed 2019-09-13 09:42:17 -07:00
Eric Anderson 3b29f74271 Move ALPN Agent configuration to each project needing it 2019-09-13 09:42:17 -07:00
Eric Anderson 5b838e5284 Apply maven-publish plugin explicitly when needed 2019-09-13 09:42:17 -07:00
Eric Anderson 55ac6f08af Apply JMH plugin explicitly when needed 2019-09-13 09:42:17 -07:00
Eric Anderson 3c3a823a81 Swap to Gradle's Plugin DSL for much of build
Examples and android projects were left unchanged. They can be changed
later.

No plugin versions were changed, to make this as non-functional of a
change as possible. Upgrading Gradle to 5.6 was necessary for
pluginManagement in settings.gradle.
2019-09-13 09:42:17 -07:00
Eric Anderson cf3e2c4ef1
auth: Avoid com.auth0:java-jwt dependency in test 2019-09-12 13:17:35 -07:00
edr 132e8bc8dd core: Add Attributes.Key for authority in EquivalentAddressGroup (#6126)
This enables NameResolvers to dynamically provide authority for each
Subchannel

Fixes #4469
2019-09-11 20:35:18 -07:00
Eric Anderson b092a29c5d core: Propagate EAG Attributes in RoundRobinLoadBalancer
This allows plumbing information to the subchannel via Attributes, like
an authority override. RR still does not support multiple EAGs that only
differ by attributes.
2019-09-11 20:34:05 -07:00
Chengyuan Zhang 7f693941f8
xds: add test for LRS retry and re-send load reports after stream closed (#6140)
* xds: add test for LRS retry and re-send load reports

* Removed log verifications.
2019-09-11 14:12:58 -07:00
ZHANG Dapeng 842dfa49b1
xds: Fix a bug locality reset not fully clean up
There is a bug in LocalityStore.reset() found during import.
2019-09-11 14:00:18 -07:00
Elliotte Rusty Harold e99672e03d all: Update to truth 1.0
* Update to truth 1.0
2019-09-11 08:53:18 -07:00
Chengyuan Zhang fa8f89a1a6
Start 1.25.0 development cycle (#6141) 2019-09-10 17:41:37 -07:00
康智冬 415212fc49 alts: fix typo (#6113) 2019-09-10 14:13:35 -07:00
Chengyuan Zhang 252ca2a7df
auth: verify information in decoded JWT token instead of comparing hashing values, which involves creds issue and expiration time. (#6137) 2019-09-10 11:09:36 -07:00
Chengyuan Zhang e866d3539c
buildscripts: add config for building grpc-cronet artifact (#6134) 2019-09-09 16:14:56 -07:00
Chengyuan Zhang 2671a3de5e
cronet: add grpc-cronet artifact publishing configurations (#6130)
* Added publish configurations in build file.

* Changed cronet dependency to cronet-api for implementation, only use full cronet implementation provider for testing.

* Set minSdkVersion to 16 as cronet dependency requires that.

* Added errorprone plugin.
2019-09-09 09:46:36 -07:00
ZHANG Dapeng fbba47e6bd
xds: Clean up some ImmutableMaps 2019-09-06 14:41:10 -07:00
ZHANG Dapeng d86eb711c4
xds: Clean up updateChildState() (#6127) 2019-09-06 14:40:46 -07:00
Chengyuan Zhang a234ada5a9
cronet: use reflection to load and invoke experimental APIs in ExperimentalBidirectionalStream.Builder (#6111)
* Use reflection to load and invoke setTrafficStats* and addRequestAnnotation methods for ExperimentalBidirectionalStream.Builder.

* Load reflection method lazily and cache for later usages.
2019-09-06 10:51:09 -07:00
ZHANG Dapeng 62e37a6e6b
xds: Cache locality for 15 minutes 2019-09-05 18:28:30 -07:00
Chengyuan Zhang d771f254aa
xds: import proto files for xDS LB bootstrap from upstream envoy repository (#6125)
* xds: import proto files for xDS LB bootstrap from upstream envoy repository.

* reorder import filenames
2019-09-04 16:33:11 -07:00
Eric Anderson 19942ba039 README.md: Swap to Gradle Plugins DSL
The Plugins DSL has matured and is now preferred. It's also more terse,
which is nice.
2019-08-30 11:39:16 -07:00
Chengyuan Zhang efc14bd299
auth: fix builder invocation for converting Google service account to Jwt access credential (#6106)
* Fixed mistaken method invocation for privateKeyId getter/setter.

* Added test coverage to verify jwt credentials are applied to request metadata correctly.

* No need to expose serviceUri method for testing.
2019-08-30 11:21:33 -07:00
Jihun Cho c9177b2327
alts: convert TsiHandshakeHandler to fit new ProtocolNegotiation style (#6104) 2019-08-30 09:59:32 -07:00
Aaditya Gavandalkar 39dc883b34 context: Implement equals and hashCode for Deadline (grpc#6075) 2019-08-30 08:25:07 -07:00
Eric Anderson daad3bcdbf benchmarks: Disable NETTY_LOCAL in TransportBenchmark
NETTY_LOCAL seem to have a flow control issue. Disable it since we don't
really look at it very often and we care about the
streamingCallsMessageThroughput benchmark.
2019-08-29 16:29:08 -07:00
Eric Anderson daed6e01b1 benchmarks: Move message throughput benchmark to TransportBenchmark
This replaces FlowControlledMessagesPerSecondBenchmark, except it does not
avoid local flow control issues via request(5). If hacking in a request(5),
this benchmark produces similar results (non-direct: 671k vs previously 641k
msg/s).
2019-08-29 16:29:08 -07:00
Eric Anderson 8d18dbd501 benchmarks: Add byte throughput benchmark to TransportBenchmark
This is equivalent to UnaryCallResponseBandwidthBenchmark and
StreamingResponseBandwidthBenchmark, although without the interface selection
logic (which allows for traffic shaping).
2019-08-29 16:29:08 -07:00
Eric Anderson 0aaaacec83 benchmarks: Remove unnecessary volatile from TransportBenchmark
TearDown is guaranteed to execute after Setup; there is no synchronization
necessary. Although the volatile doesn't hurt anything functionally, it is
misleading and confusing.
2019-08-29 16:29:08 -07:00
Eric Anderson a919ef7f74 benchmarks: Delete SingleThreadBlockingQpsBenchmark
It is basically the same as TransportBenchmark without protobuf, smaller
payload, and only Netty. It does show latencies around 66 µs instead of
TransportBenchmark's 70 µs on my laptop, but a quick conversion of
TransportBenchmark to ByteBufOutputMarshaller made it 66 µs as well.
2019-08-29 16:29:08 -07:00
Eric Anderson 3a78325a65 Move HandlerRegistryBenchmark to core/
It blended in with Netty benchmarks, so was missed in our earlier
reorganization.
2019-08-29 16:29:08 -07:00