2800 Commits

Author SHA1 Message Date
6f35246b2a resolver_conn_wrapper.go: fix minor typo (#2135) 2018-06-08 15:37:41 -07:00
0e5a36b652 internal: move leakcheck to internal/ (#2129)
internal: move leakcheck to internal/
2018-06-07 16:57:56 -07:00
26ac8d285c Revert "status: handle invalid utf-8 characters" (#2127)
Reverts grpc/grpc-go#2109

Test failure:
https://travis-ci.org/grpc/grpc-go/builds/388898555

Possible reason: `proto.Marshal` doesn't always return error even if message contains invalid utf8 char.
2018-06-06 17:58:36 -07:00
9c658603f0 status: handle invalid utf-8 characters (#2109)
fixes #2078

A status with invalid utf-8 characters could still be created, but invalid characters will be replaced with [Unicode replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) before being sent out. Those bytes will still be percent encoded.

All details added to this invalid status will be dropped.
2018-06-06 10:58:32 -07:00
96cefb43cf Revert " channelz: stage 4 - add security and socket option info" (#2124)
Reverts grpc/grpc-go#2098

Appengine will fail with the error below:
```
go-app-builder: Failed parsing input: parser: bad import "syscall" in google.golang.org/grpc/channelz/funcs.go from GOPATH
```

The root cause of it is in type_linux.go.
629f6bc5e5/channelz/types_linux.go (L21-L25)
2018-06-05 18:04:12 -07:00
629f6bc5e5 grpclb: minor fixes on comments and tests (#2122)
* modify noimport.go panic message
* package level comments
* remove useless error check at grpclb_test.go:343
2018-06-05 13:52:07 -07:00
c1a21e22a6 channelz: stage 4 - add security and socket option info (#2098) 2018-06-05 13:50:19 -07:00
4344c204c9 Split grpclb out of top level grpc package (#2107)
This PR splits out grpclb from grpc.  I have made the PR in several commits so you can see more clearly the steps that happened.

There are a few possibly contentious points that I would like to make clear up front:

* grpclb will no longer autoload as a load balancer.  I think this is okay, as service config is not widely (at all?) used, and I believe this is the only way to access it.
* `internal` is used more, as a way of having code shared between packages without exposing types
* ConnectivityStateEvaluator, as used by grpclb, is no longer thread safe.  I believe there is an outer mutex that guards access, but I want to point out this subtle change up here.

All but one tests pass with this, due to another cyclic dependency.  I can fix this, but it is a little more widely scoped (such as exposing grpc.server and grpc.errorDesc in the internal package).   This PR is a nearly-passing sample of that last step to get this working. 

PTAL @menghanl @dfawley
2018-06-05 09:54:12 -07:00
35085cc92d Reduce error logs in transport. (#2117) 2018-06-04 15:25:35 -07:00
2c5843ebfd DNS resolver: Throw an error for non-default DNS authority. (#2067) 2018-06-04 10:43:01 -07:00
70e9c28461 grpclb: sync messages.proto and update client load reporting (#2101) 2018-06-04 10:02:09 -07:00
130c87fa0d alts: copy handshake address in Clone() (#2119) 2018-06-01 15:33:31 -07:00
b94ea975f3 codes: fix: marshal/unmarshal a Code to JSON fails (#2116)
Marshalling a Code to JSON and unmarshalling it failed with an
"invalid code" error message.

Code is of type uint32. It has no custom MarshalJson() implemented
therefore it is marshalled into an JSON integer value.
The UnmarshalJSON() function expected that the marshalled Code is a
String type, unmarshalling failed.

Check in UnmarshalJSON() if the value is an uint32 in the range of the
defined Code values. If it is, unmarshal it.

This commit also adds an Marshal/Unmarshal testcase.
2018-06-01 10:56:55 -07:00
590da37e2d Account for user configured small io write buffer. (#2092) 2018-05-29 14:11:52 -07:00
bfe419798a clarify CloseSend vs CloseAndRecv; better formatting (#2071)
clarify CloseSend vs CloseAndRecv; better formatting
2018-05-29 11:35:11 -07:00
bd7f82c7b1 internal/grpcrand: New package for concurrency-safe randoms (#2106) 2018-05-29 09:06:35 -07:00
1fa3750c9a Clarify newCCResolverWrapper documentation. (#2100)
I think the goroutine does not get started any more (this used to be the case in an earlier version).
2018-05-24 10:21:01 -07:00
d33a923190 Revert "channelz: stage 4 - add security and socket option info" (#2096)
This reverts commit 7cc2837209c4fa87008717b4e94a085820d7d779.

The PR breaks darwin builds

src/google.golang.org/grpc/channelz/types_unix.go:35:15: undefined: unix.TCPInfo
2018-05-22 15:31:57 -07:00
7cc2837209 channelz: stage 4 - add security and socket option info (#1965) 2018-05-22 13:32:02 -07:00
c16e07b130 stickiness: limit the max count of stickiness keys (#2021)
And remove the oldest when the limit was already reached.
2018-05-21 17:10:29 -07:00
dea4e57312 Benchmarks that runs server and client and separate processes. (#1952) 2018-05-21 16:00:01 -07:00
8f06f82ca3 Synchronize WriteStatus with WriteHeader on server. (#2074) 2018-05-21 15:59:39 -07:00
f669235193 internal: update proto generated code (#2093) 2018-05-21 09:59:26 -07:00
3b7feb1847 health: generate health proto from grpc-proto (#2081) 2018-05-17 11:11:47 -07:00
be1fb4f275 internal: remove redundant channelz service go generate (#2085) 2018-05-16 18:03:05 -07:00
1bacc35978 Revert "Strip port from server name in grpclb (#2066)" (#2083)
This reverts commit d24d0a4b993587a34ac7d09ac956b0375ee7d1fa.
2018-05-16 15:37:34 -07:00
4e829f028a channelz: generate proto from grpc-proto repo (#2082) 2018-05-16 13:51:51 -07:00
b4dd78522b internal: move version to a separate file (#2080)
So it's easier to update version when doing releases.
2018-05-16 10:32:41 -07:00
679ceaae57 internal: fix travis failure on alts proto (#2079) 2018-05-16 10:32:11 -07:00
dbffeabcbc test: make end2end test use split grpc / proto imports (#2069) 2018-05-16 10:03:45 -07:00
9020130bcf credentials/alts: make go:generate rebuild alts protos (#2056) 2018-05-15 15:42:21 -07:00
f64553fe64 channelz: split channelz grpc and pb (#2068) 2018-05-15 11:24:46 -07:00
d24d0a4b99 Strip port from server name in grpclb (#2066)
The grpclb server expects server name to not have port number
2018-05-15 11:23:12 -07:00
161c19534c benchmark: listen on all addresses in benchmark servers (#2073) 2018-05-14 17:26:00 -07:00
a36eb4675a regenerate *.pb.go files due to proto-gen-go update (#2070) 2018-05-11 18:57:54 -07:00
9a54b9abad transport: respect http2 setting SETTINGS_HEADER_TABLE_SIZE (#2045) 2018-05-11 14:58:26 -07:00
419de394cf Add AuthInfoFromContext utility API (#2062) 2018-05-11 14:16:43 -07:00
4ab6e31b84 Fix possible data loss; Only let reader goroutine handle connection errors. (#1993)
* First commit.

* Post review updates.
2018-05-11 13:51:50 -07:00
091a800143 split encode into three functions (#2058) 2018-05-11 13:47:10 -07:00
b75baa103c small documentation addition to NewStream (#2060) 2018-05-11 08:43:47 -07:00
0ebfac42d6 Documentation: Add initial documentation on concurrency (#2034) 2018-05-10 13:08:19 -07:00
d07538b147 status: Introduce FromContextError convenience function (#2057) 2018-05-10 09:54:36 -07:00
45d7f3a23f Change version to 1.13.0-dev (#2054) 2018-05-08 14:17:26 -07:00
854695bef0 client: introduce WithDisableServiceConfig DialOption (#2010) 2018-05-08 10:28:26 -07:00
a36d2ab501 fix flaky test caused by race in channelz test (#2051) 2018-05-07 17:46:58 -07:00
18957c5fcd Fix typo (#2050) 2018-05-04 10:55:21 -07:00
b412d5aa54 Ignore metadata that gRPC explicitly sets. (#2026) 2018-05-03 13:19:15 -07:00
e09cbb70fe internal: better test names (#2043) 2018-05-03 13:17:45 -07:00
0bc7c3280e Revert "Less mem (#1987)" (#2049)
This reverts commit 7a8c9895074e03bc7fcff30bd561eaef4fa76dfa.
2018-05-03 11:37:59 -07:00
ed2472917f client: fix interceptors after recent cleanup (#2046)
This is a partial revert of #2027 which seems to have broken the ability
to inject payload inspecting client interceptors. Specifically it causes
this test to break:
eb0079f598/bigtable/bigtable_test.go (L949-L971)

With:
panic: interface conversion: grpc.ClientStream is *bigtable.requestCountingInterceptor, not *grpc.clientStream [recovered]
	panic: interface conversion: grpc.ClientStream is *bigtable.requestCountingInterceptor, not *grpc.clientStream

Which seems to be caused by invoke() expecting a clientStream from a
ClientConn:

7c204fd174/call.go (L74)
2018-05-03 09:00:38 -07:00