3278 Commits

Author SHA1 Message Date
d15f1a4aa1 test: Move creds related to tests to creds_test.go (#3542) 2020-04-16 16:30:23 -07:00
f9ac13d469 credentials/alts: Properly release server InBytes buffer after the handshake is complete. (#3529) 2020-04-16 15:09:15 -07:00
759569bb9c balancer: support hierarchical paths in addresses (#3494) 2020-04-16 14:45:21 -07:00
f9a1aeb4f2 xds: accept either "" or "/" as the prefix for the default route (#3535) 2020-04-15 16:50:46 -07:00
ff40ef4227 xds: refactor xds_client (#3477)
This PR refactors xds_client to support multiples watches. Those watches can be for the same type and same resource_name.

There's upper level `Client` and lower level `v2client`. Before this change, all logic was in `v2client`, and `Client` was a thin wrapper.

This PR moves some of the functionality from `v2client` to `Client`. New layers:

- Upper level `Client`
  - keeps a list of watchers
    - provides method `func WatchXXX() (cancel func())`
    - has `WatchService()` which involves `LDS` and `RDS`
  - handles resources from the xDS responses and dispatch to the watchers
    - including multiple watchers for the same resource_name
  - keeps cache
    - and checks cache for new watches

- Lower level `v2client`
  - is a dumb client that
    - manages ADS stream
    - sends a new xDS request when add/remove watch
    - parses xDS responses
      - It doesn't call watchers, but forwards all parsed results to upper Client
    - handles ACK/NACK
  - supports `addWatch(type, name)` and `removeWatch(type, name)`
    - instead of `func watchCDS() func()`, which is now moved up to upper `Client`

Also includes other changes:
 - Corresponding test changes (some tests for `v2client` were moved to `Client`)
 - Method and type renaming
   - CDS/EDS -> Cluster/Endpoints
 - callback functions all accept updates as non-pointers
2020-04-15 14:32:31 -07:00
6e001bea42 README: add link to Go releases (#3526) 2020-04-15 10:32:57 -07:00
c7079afb44 lint: fail on missing package comment (#3524)
golint does check for missing package comment, but with low confidence.
golint checks each file, and complains on every file missing package comment, even though another file in the same package has the comment.

This PR adds a golint check with low min_confidence, and filters out false-positives.
2020-04-15 09:59:17 -07:00
c97e1d3b72 Revert "credentials/alts: Properly release server InBytes buffer after the handshake is complete. (#3513)" (#3528)
This reverts commit 7c3fd13027648f7fe3bfc6e16289c65c09493e69.
2020-04-14 15:09:23 -07:00
4c4cafbab7 internal/transport: Get rid of TargetInfo struct. (#3527) 2020-04-14 14:43:14 -07:00
46c755aff1 rename to LocalityID (#3522) 2020-04-14 09:04:53 -07:00
8e6052a06f fix typo in flag description (#3520) 2020-04-13 13:55:48 -07:00
a783b25fe5 internal: rename proto import to end with pb (#3523) 2020-04-13 12:37:38 -07:00
27096e8260 doc: update README for supported Go versions and travis for tests (#3516) 2020-04-10 16:01:05 -07:00
7c3fd13027 credentials/alts: Properly release server InBytes buffer after the handshake is complete. (#3513) 2020-04-09 22:35:28 -07:00
b02de00073 client: option to surface connection errors to callers (#3430)
This commit allows blocking clients to receive a more informative error
message than "context deadline exceeded", which is especially helpful in
tracking down persistent client misconfiguration (such as an invalid TLS
certificate, an invalid server that's refusing connections, etc.)
2020-04-09 13:45:13 -07:00
a9555d046f balancergroup: update methods to V2balancer (#3505)
And make balancergroup stop load reporting is load store is not set
2020-04-09 11:20:37 -07:00
709091fe14 service config: move balancer config parsing to internal (#3504)
And make it a json unmarshaller, easy to use.
2020-04-08 13:57:52 -07:00
7f19477365 Change version to 1.30.0-dev (#3511) 2020-04-08 13:31:42 -07:00
85e3a6fdd7 credentials: Update doc strings for NewClientTLSFromCert et. al. (#3508) 2020-04-08 11:05:45 -07:00
3038e58ed2 examples: add example to show how to use the health service (#3381) 2020-04-08 10:38:37 -07:00
98e4c7ad3e xds: move balancer group to a separate package (#3493)
This PR moves balancer group to a separate package and exports the type with some methods. Balancer group will be used by the weighted_target policy.
2020-04-06 15:12:58 -07:00
c5faf568da status: move statusError to internal/status package (#3432) 2020-04-06 11:03:17 -07:00
7cb4db26f1 internal: update grpc_lb_v1 proto (#3499) 2020-04-06 10:09:23 -07:00
a9601d93f4 xds: update nonce even if the ACK/NACK is not sent on wire (#3497)
This can happen when the watch is canceled while the response is on wire.

Also, tag ACK/NACK with the stream so nonce for a new stream doesn't get updated by a ACK from the previous stream.
2020-04-03 13:09:57 -07:00
66e9dfe703 transport: fix handling of header metadata in serverHandler (#3484) 2020-04-03 12:39:25 -07:00
aedb1362d5 balancer: change roundrobin to accept empty address list (#3491)
Roundrobin will remove all SubConns. The ClientConn will set SubConn state change to shutdown, and the overall state will turn transient failure.
2020-04-03 09:47:59 -07:00
fe1d8e7181 xds: add temporary logging to LRS (#3490) 2020-04-02 16:55:06 -07:00
508cf42036 cleanup: fix typo in grpclib_remote_balancer.go (#3486) 2020-04-01 21:19:11 -07:00
cc864071cc rls: Manually implement equality of key builder maps. (#3476)
cmp.Equal is not supposed to be used in production code because of its
propensity towards panicking.

This equality will eventually be checked from the LB policy when it gets
a service config update.
2020-03-31 14:20:17 -07:00
e965f2a60b client: add a WithNoProxy dialoption (#3411) 2020-03-26 15:29:40 -07:00
5dbd4c232c kokoro: allow individual test case logs for xds (#3478)
Also reduce the size of the grpc/grpc download
2020-03-26 11:07:05 -07:00
192c8a2a35 rls: Rename type picker to rlsPicker. (#3475)
This change only renames the type and reformats some comments. No change
in functionality. The rename was deemed necessary once I started
implementing the balancer and wanted to be consistent. The builder is
named `rlsBB`, the balancer is named `rlsBalancer`, so the picker should
be `rlsPicker`. Also, this rename allows the field in the balancer which
caches the last picker to be named `picker`.
2020-03-25 15:26:46 -07:00
7c502e141a wrr: make random wrr thread safe (#3470) 2020-03-23 09:17:57 -07:00
fe80f08f1f Update test credentials to 2048-bit RSA keys (#3467) 2020-03-23 15:48:25 +01:00
b3dcc68129 stats: set response compression codec on stats.InHeader and stats.OutHeader (#3390) 2020-03-20 10:12:38 -07:00
197c621dff xds: use generated protos from github.com/cncf/udpa/go (#3449)
The upstream repo contains generated Go packages, so there's no need to
generate a separate version here.
2020-03-19 13:15:44 -07:00
166461e2c4 channelz: Make staticchecker happy on darwin. (#3469)
convertToPtypesDuration is used only in linux. So, moving to the linux
specific file so that the staticchecker does not complain on dawrin..
2020-03-19 09:56:47 -07:00
09c4b45e16 vet: Get it to work on Darwin. (#3452) 2020-03-19 08:51:10 -07:00
71f583e958 xds: split callback in xds_client to avoid type assertions (#3450) 2020-03-18 16:00:08 -07:00
ba34a8c58b doc: fix link in xds readme to point gRFC (#3466) 2020-03-18 14:06:38 -07:00
b9b4456a0c README: add KeepaliveParameters hint to FAQ (#3465)
This error can happen when long lived streams are used
together with KeepaliveParameters that regularly
shut down existing connections.
2020-03-18 08:55:20 -07:00
804ff443fc rls: Implementation of the picker (#3423) 2020-03-16 10:43:00 -07:00
399ae78064 alts: add trailing dot to metadata.google.internal (#3460) 2020-03-16 10:14:15 -07:00
09f5e89ac4 kokora: checkout matching grpc/grpc branch for xds test (#3456) 2020-03-13 14:17:50 -07:00
4e487c1661 xds: rename WatchEDS to WatchEndpoints in xds_client (#3447) 2020-03-12 13:42:44 -07:00
ecea6ed1fc xds: better way to compare and update dropper in EDS (#3434) 2020-03-12 13:41:54 -07:00
9e4ff32c82 client: fix getResolver to use scheme param (#3437) 2020-03-12 13:41:38 -07:00
a6bd100681 kokoro: add xds job (#3448) 2020-03-12 13:37:26 -07:00
0e160327ed rls: Implementation of the RLS client. (#3446) 2020-03-11 18:37:57 -07:00
47c04d199d rls: LB config cleanup (#3443)
1. Store the RLS server name (lookupService field) as a string instead
   of as a resolver.Target as this is passed to grpc.Dial when creating
   the control channel.
2. Store the default target specified in the ServiceConfig in a field in
   the lbConfig struct.
3. Move some constants defined in builder.go to config.go because they
   are only used in the latter.
2020-03-11 08:55:55 -07:00