3081 Commits

Author SHA1 Message Date
dc9615bb06 xds: Initial implementation of a client using the v2 API (#3144)
This object will be used by a higher level xdsClient object, which will
provide the watch API used by the xds resolver and balancer
implementations.
2019-11-12 10:31:11 -08:00
460b1d2ced dns: disable SRV record lookups unless grpclb is imported (#3149) 2019-11-11 10:12:40 -08:00
51ac07fb67 vet: revise staticcheck strategy (#3152) 2019-11-08 14:46:57 -08:00
95c3759457 examples: change wait into job polling loop after killing tests (#3168) 2019-11-08 14:46:36 -08:00
d903dd74ec interop: add grpclb fallback test (#2994) 2019-11-08 13:14:23 -08:00
4717e3b570 resolver: add deprecation note to AddressType and its values (#3156) 2019-11-08 10:38:45 -08:00
f691f3524e resolver: re-add dns and passthrough packages as references to internal versions (#3162) 2019-11-08 09:53:51 -08:00
caaa764950 examples: enable debugging to help determine why tests are hanging (#3166) 2019-11-08 09:53:16 -08:00
6071e7015f more detailed log message (#3117) 2019-11-07 13:12:57 -08:00
c2b74f7468 xds: set client node.BuildVersion to gRPC version (#3140) 2019-11-07 09:59:00 -08:00
2548a2203d internal: fix EDS test race in cmp/sort (#3154) 2019-11-06 19:38:51 -08:00
0aa47d32da resolver: introduce attributes package and use it for Address and State (#3151) 2019-11-06 16:53:23 -08:00
2d2f65684c cleanup: fix generic comparisons on protobuf messages (#3153)
Generated protobuf messages contain internal data structures
that general purpose comparison functions (e.g., reflect.DeepEqual,
pretty.Compare, etc) do not properly compare. It is already the case
today that these functions may report a difference when two messages
are actually semantically equivalent.

Fix all usages by either calling proto.Equal directly if
the top-level types are themselves proto.Message, or by calling
cmp.Equal with the cmp.Comparer(proto.Equal) option specified.
This option teaches cmp to use proto.Equal anytime it encounters
proto.Message types.
2019-11-06 14:25:07 -08:00
dd568c0669 xds: support priority (#3066)
Each priority maps to a balancer group.

When a priority is in use, its balancer group is started, and it will close the balancer groups with lower priorities. When a priority is down (no connection ready), it will start the next priority balancer group.
2019-11-06 13:09:11 -08:00
76e6ad37f4 Change version to 1.26.0-dev (#3148) 2019-11-05 14:14:16 -08:00
6dac020480 test: add test of malformed gzip payload (#3141) 2019-11-05 11:11:34 -08:00
6c48774ffb travis: move example tests to a separate run (#3143)
The example tests were causing travis timeout.
2019-11-05 10:34:44 -08:00
b09352fc84 xds: add new fields to XDSConfig (#3100)
Fields are added in: https://github.com/grpc/grpc-proto/pull/64

Other changes:
 - Move XDSConfig from internal to balancer
   - Later we will add a separate config for CDS balancer
 - generate service_config.pb.go and test with json generated from proto message
2019-11-05 09:17:10 -08:00
bbd4b7ae28 eds: skip unhealthy endpoints (#3137)
Unknown and healthy are both considered healthy.

https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/health_check.proto#envoy-api-enum-core-healthstatus
2019-11-05 09:03:22 -08:00
583401aac5 Add a general purpose unbounded buffer implementation (#3099)
This PR moves the unbounded buffer implementation found in
`scStateUpdateBuffer` to the internal package. It also makes the buffer
work with `interface{}` type.

This addresses a TODO in the existing code. This will also help with the
eventual `BalancerManager` implementation which will supersede the
`ccBalancerWrapper` implementation found in balancer_conn_wrappers.go.
2019-11-04 14:22:16 -08:00
88bf070301 resolver: Add new fields to resolver.BuildOption struct to support dialing a remote name resolver (#3098)
These fields will be used by resolver implementations which need to talk
to a remote name resolver.
2019-11-04 08:41:14 -08:00
7c97d1d53c docs: fix reflection doc (#3138)
added `git submodule update --init` to readme instructions to pull in missing dependencies.
2019-11-04 08:32:18 -08:00
da2bec01b9 test & testutils: prevent goroutine leaks in test functions (#3133) 2019-11-01 14:51:58 -07:00
0f32486dd3 transport: minor code simplification (#3136) 2019-11-01 11:11:23 -07:00
8988da6e70 examples: add examples regression test script (#3118) 2019-10-31 13:11:53 -07:00
8eafb5b7d5 xds: remove cds from the current xds balancer (#3085)
cds will be done in a separate cds balancer.
2019-10-31 09:44:09 -07:00
459a38a0e3 grpclb: enter fallback if no balancer addresses are available (#3119)
This is necessary because there's another way to select grpclb (by specifying grpclb in service config's balancing policy field). So it's possible that grpclb is picked, but resolver doesn't have any balancer addresses.

When an update without balancer address is received, grpclb closes the underlying ClientConn to remote balancer, and enters fallback mode.

Note that grpclb waits until the ClientConn and the RPC goroutines are actually closed to do the fallback work. This can avoid race caused by async close.
2019-10-31 09:43:18 -07:00
ff5f0e93f5 xds: add script to regenerate orca (#3131) 2019-10-30 10:14:39 -07:00
ee90cbdad7 stalebot: only update one issue per run to prepare for re-enabling it (#3129) 2019-10-29 13:24:38 -07:00
5367efb805 cleanup: no x/net/context (#3120)
Manual change + mockgen
2019-10-29 13:06:26 -07:00
a8f166a036 xds: use generated files from go-control-plane (#3083)
validate needs to be removed, otherwise build fails due to duplicate
proto type registered.
2019-10-29 11:14:20 -07:00
4ec516e589 interop, examples: use localhost instead of 127.0.0.1 (#3124) 2019-10-28 14:41:46 -07:00
88080a2423 Update the comment for newCCResolverWrapper. (#3123) 2019-10-28 10:05:33 -07:00
0f2d539339 client: Keepalive pings should be sent every [Time] period (#3102)
This commit makes the following changes:
- Keep track of the time of the last read in the transport.
- Use this in the keepalive implementation to decide when to send out
  keepalives.
- Address the issue of keepalives being sent every [Time+Timeout] period
  instead of every [Time] period, as mandated by proposal A8.

Proposal A8 is here:
https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md
2019-10-23 20:33:53 -07:00
c0909e91a5 resolver: move dns and passthrough to internal (#3116)
Nobody should directly need to reference these packages.

This is technically a breaking change. However:

- Package dns was exporting a NewBuilder method. This should never have been necessary to use, but if so, it can be replaced by importing the "grpc" package and then using resolver.Get("dns").

- Package passthrough was not exporting any symbols and there was never a need to even blank-import it.

After as much searching as possible, it appears nobody in the open source community is referencing either of these packages.
2019-10-22 13:01:54 -07:00
a7c1650ef7 fix typos (#3111) 2019-10-22 10:46:34 -07:00
041ead0785 xds: cache locality (sub-balancer) (#3067)
When a locality is removed from EDS response, it's corresponding
sub-balancer will be removed from balancer group.

With this change, the sub-balancer won't be removed immediately. It will
be kept in a cache (for 15 minutes by default). If the locality is
re-added within the timeout, the sub-balancer in cache will be picked
and re-used.
2019-10-21 15:20:28 -07:00
b53233ce4c examples: add regression test script to hello world example (#3092) 2019-10-21 13:00:46 -07:00
7c3115d8bb client: fix bug with cancellation propagation for unary RPCs (#3106) 2019-10-17 13:04:53 -07:00
5e3ef93a5f grpclb: avoid use of reflect.DeepEqual on proto.Message types (#3101) 2019-10-17 12:55:08 -07:00
7c8e60372e Add more details in ClientConn GoDoc. (#3096)
The newly added lines are mostly stolen from existing Java and C-core
documentation.
2019-10-15 09:18:24 -07:00
d5ab7434d4 credentials: accept another listen error as lack of support in test (#3097) 2019-10-14 16:16:11 -07:00
027cd627f8 Fix a data race in resolver_conn_wrapper.go (#3090) 2019-10-14 15:13:33 -07:00
0859afa33d xds: set dial target in request resource_names (#3081) 2019-10-14 09:31:56 -07:00
1610f0fd86 mod: move test/tools to a different module (#3086) 2019-10-14 09:31:07 -07:00
c0122323a5 fix typo for grpclb token key (#3094) 2019-10-14 08:57:17 -07:00
ef403a2ec1 Make healthcheck tests in end2end_test.go more readable. (#2883)
* Make healthcheck tests in end2end_test.go more readable.

- Made these tests use the default health service implementation
  wherever possible.
- Refactored some common code used in these tests into helper functions.
- Added function comments for all these tests to improve readability.

In a follow up PR, I will be moving all these tests into
healthcheck_test.go.
2019-10-11 10:38:51 -07:00
f07f2cffa0 credentials: Use net.SplitHostPort safely parse IPv6 authorities in ClientHandshake (#3082) 2019-10-09 10:48:24 -07:00
ff0c603b9b proxy_test: Fix a goroutine-leak bug in testHTTPConnect: now use channel done to store err and call t.Fatalf when err not nil (#3080) 2019-10-09 10:12:01 -07:00
2d6a3edc72 cleanup: fix typo (#3084) 2019-10-09 10:10:07 -07:00