Commit Graph

3966 Commits

Author SHA1 Message Date
Sanjay Pujare edd9e5a257 define interface for the new TlsContextManager that will replace the SecretManager 2019-10-04 18:16:02 -07:00
Eric Anderson a462a3bc8e COMPILING.md: Reduce dependencies when building protobuf
These changes avoid a dependency on automake, autoconf, and libtool. The
./configure script is only available via the release artifacts, not git.

For example, on Debian Buster only curl and build-essential need to be
installed.
2019-10-04 15:35:05 -07:00
ZHANG Dapeng 31b1da5a8d
xds: bootstrap xDS load balancer with xDS name resolver
`XdsNameResolver` will load bootstrap file and populate `Node` reference to the `XdsLoadBalancer` through attributes of `ResolvedAddresses`. This is only for demo purpose until `XdsClient` is available, whence `XdsNameResolver` will populate `XdsClient` reference to `XdsLoadBalancer` through attributes instead.
2019-10-04 12:13:48 -07:00
Sanjay Pujare ed4f1fbdae Mark XdsAttributes internal 2019-10-04 10:37:34 -07:00
Sanjay Pujare c16b104e61 Adding more attributes to XdsAttributes and making XdsAttributes public to prepare for using *TlsContext in the new SecretManager 2019-10-04 10:37:34 -07:00
Sanjay Pujare 103c2f9858 re-add the grpc-netty dependency 2019-10-03 16:02:22 -07:00
ZHANG Dapeng dba7e9c36f
xds: migrate to restructured xds loadbalancer
* Deleted:
  + XdsLoadBalancer
  + XdsLbState
  + XdsComms
  + Their test classes (except XdsCommsTest)
* Moved/Renamed:
  + AdsStreamCallback -> LookasideChannelCallback
  + AdsStreamCallback2 -> AdsStreamCallback
  + XdsComms.LocalityInfo -> ClusterLoadAssignmentData.LocalityInfo
  + XdsComms.LbEndpoint -> ClusterLoadAssignmentData.LbEndpoint
  + XdsComms.DropOverload -> ClusterLoadAssignmentData.DropOverload
  + XdsLocality -> ClusterLoadAssignmentData.XdsLocality
* XdsComms2 is not renamed because it's temporary.
* XdsLoadBalancer2 is not renamed because otherwise the diff is hard to read.
2019-10-03 15:58:53 -07:00
ZHANG Dapeng 90b3c88fe2
api: avoid infinite loop in handleResolvedAddresses
If a `LoadBalancer` implementation does not override `handleResolvedAddressGroups()`, or overrides `handleResolvedAddressGroups()` but calls `super.handleResolvedAddressGroups()` at the beginning or the end, it will be trapped in an infinite loop.
2019-10-03 15:58:18 -07:00
ZHANG Dapeng 28323e2fb6
xds: plumbing restructured xds loadbalancer
Moved `ManagedChannel initLbChannel(Helper helper, String balancerName)` out of `LookasideChannelLb` because `LoadReportClientImpl` need channel be initialized already. 

Migration will be in an upcoming PR.
2019-10-02 15:13:39 -07:00
Jihun Cho e9ac1b4a76
all: update modules to wait until other module's sourceSet is available (#6232) 2019-10-02 15:05:44 -07:00
Sanjay Pujare 5e814d49d1 xds: remove the inapplicable text from a comment - as pointed out in a previous PR 2019-10-02 14:15:24 -07:00
Sanjay Pujare e1323e46d1 xds: Add tlsCertificate and certificateValidationContext attributes to XdsAttributes: needed for passing those values to the SDS component 2019-10-02 14:15:24 -07:00
sanjaypujare 468d540bc9
SecretManager implementation for file secrets (#6173)
* SecretManager implementation for file secrets (only TlsCertificate in this PR)
2019-10-02 09:36:42 -07:00
ZHANG Dapeng 2bc8c452f3
xds: restructure XdsLoadBalancer Part 4: LookasideChannelLb
Note: XdsComms2 is a temporary refactor of XdsComms, and will be re-implemented with the new XdsClient design.
2019-10-01 16:33:26 -07:00
Chengyuan Zhang e448f9c7d3
xds: reimplement bootstrapping with new bootstrap file format design (#6201)
This change reimplements Bootstrapper with new design of bootstrap file format, with no longer using ApiConfigSource proto. The new JSON format of the bootstrap file contains a top level "node" and a "xds_server" object, which contains a "server_uri" string and a `channel_creds` list for channel credentials.

Unknown fields in the bootstrap file are allowed by ignored so that the implementation does not break when new fields are added in the future. Therefore, we cannot simply create a custom proto file and use proto util to parse it.
2019-10-01 14:48:28 -07:00
Przemek Piotrowski 9668102f05 netty: bump to 4.1.42 (#6175)
netty: bump to 4.1.42
2019-10-01 13:41:06 -07:00
Eric Anderson c5c7755d3f repositories.bzl: Fix typo in maven_install override_targets
The typo was present in the initial version added in 9d6f532
2019-10-01 12:57:08 -07:00
Chengyuan Zhang 881594100b
andriod-interop-testing: fix InteropTask construction failure with wrong parameters (#6223) 2019-09-30 15:26:01 -07:00
Eric Anderson ad159cea96 Remove vestigial SuppressWarnings("LiteralClassName")
Error Prone 2.1.2 removed the warning.
2019-09-30 14:02:46 -07:00
Eric Anderson 65b495c6bc benchmarks: Remove unnecessary unchecked casts 2019-09-30 14:02:24 -07:00
Eric Anderson 0be86a5731
alts: Use Conscrypt when available
We depend on Conscrypt to help ensure Conscrypt 2.1.0 or newer is used.
It's not 100% clear this is the best approach, but it is the simplest at
present. If Conscrypt is not available then we will just use the JDK's
slower implementation of AES-GCM.

Fixes #6213
2019-09-30 13:39:22 -07:00
Jihun Cho a8137dc18f bom: specify pom type for protoc-gen-grpc-java 2019-09-30 13:05:57 -07:00
Jihun Cho caf54fb66f bom: format(tab->space) build.gradle 2019-09-30 13:05:57 -07:00
Jihun Cho 3f11b27a22 alts: make AltsHandshakerClient#close can be called multiple times 2019-09-27 14:42:40 -07:00
Jihun Cho 15295c75ae examples: add mavenCentral build.gradle without jcenter repo 2019-09-27 14:33:21 -07:00
Jihun Cho 5afba81806 build: add mavenCentral to repositories 2019-09-27 14:33:21 -07:00
Chengyuan Zhang 18a9671ea0
core: move check Json object methods to JsonUtil (#6214) 2019-09-27 14:29:26 -07:00
Chengyuan Zhang d3e86da6b6
core: move generic Json util methods out of ServiceConfigUtil (#6211) 2019-09-27 11:45:38 -07:00
sanjaypujare 7435221629
Make grpc-xds dependent on grpc-netty - needed for TLS related protocolNegotiator implementations in grpc-xds (#6206) 2019-09-27 11:21:58 -07:00
Chengyuan Zhang 214eaae3ba
android-interop-testing: remove settings for using GET via setting MethodDescriptor to safe (#6203)
* Removed client interceptor that sets safe in method descriptor.

* Removed useGet checkbox in UI.
2019-09-27 11:10:47 -07:00
Jihun Cho e3be6a6bfa
compiler: add license header for cpp codes (#6208) 2019-09-27 09:22:42 -07:00
Chengyuan Zhang 68eba768c9
cronet: do not include internal accessors in Javadoc (#6205) 2019-09-26 15:27:47 -07:00
Jihun Cho e67fdb3af9
github: wrap question template in comment blocks (#6199) 2019-09-26 14:21:18 -07:00
Chengyuan Zhang 4ec5be387e
Update README etc to reference 1.24.0 (#6197) 2019-09-25 16:40:09 -07:00
Carl Mastrangelo ab2aff48dc netty,okhttp,cronet: add option to use get/put when methods are safe/idempotent
This change adds two booleans to the ChannelBuilders to
allow transports to use get and put.   These are currently defaulted to
on, but unset on the method descriptors.   This change is 1/2 that will
allow the safe / idempotent bits to be set on generated proto code.
Part 2/2 will actually enable it.

The use case for this is for interceptors that implement caching logic.
They need to be able to access the safe/idempotent bits on the MD in
order to decide to how to handle the request, even if gRPC doesn't use
GET / PUT HTTP methods.
2019-09-25 14:57:17 -07:00
Eric Anderson bd48891dab netty: Check for TE header after checking Content-Type
Checking too early leads to false-positives, like if a non-gRPC client
contacts the server or a grpc-web client.
2019-09-25 14:04:19 -07:00
Jihun Cho 5912d62019
github: update issue templates (#6191) 2019-09-25 13:44:01 -07:00
Jihun Cho 1ab651073d
alts: add close to TsiHandshaker to avoid resource leak for some impls (#6186)
* alts: add close to TsiHandshaker to avoid resource leak for some implementations

* fix linter error
2019-09-25 13:23:52 -07:00
ZHANG Dapeng 694de41107
xds: add server name in EDS request resource_names field 2019-09-25 12:48:03 -07:00
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