Commit Graph

2805 Commits

Author SHA1 Message Date
CodeLingo Bot c2f12b83a7 Fix error formatting based on best practices from Code Review Comments (#2615) 2019-02-07 10:01:40 -08:00
Doug Fawley d14ffaeb5c
client: deprecate CallCustomCodec and provide new version using encoding.Codec (#2556) 2019-02-01 10:21:31 -08:00
Doug Fawley 1925e2441e
client: don't allow io.EOF to be passed from balancer to user (#2604) 2019-01-30 16:28:11 -08:00
Doug Fawley 25e74d3f23
vet: use fail_on_output so user can see why git client is not porcelain (#2605) 2019-01-30 10:56:44 -08:00
Doug Fawley 8e6533ee6e
client: clean up v1 balancer wrapper error handling (#2511) 2019-01-30 10:56:23 -08:00
Nick Jones eda3b7e3ed client: fix handling of GRPC_GO_REQUIRE_HANDSHAKE=on to not interpret as "hybrid" (#2603)
6cc789b34b made `envconfig.RequireHandshakeOn` the default when unspecified by environment variable, but missed a fallthrough leading to `GRPC_GO_REQUIRE_HANDSHAKE=on` specifying `envconfig.RequireHandshakeHybrid`.  This change adds the missing fallthrough.
2019-01-29 15:00:25 -08:00
apolcyn 17f2449821 Add google_default_credentials interop test case for go (#2600)
Implementing the [google default creds](https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#google_default_credentials) interop test for go.

This test case was added in https://github.com/grpc/grpc/pull/17213. The existing OAuth creds test cases turned out to not be great first for google default creds testing, so https://github.com/grpc/grpc/pull/17213 got rid of those tests and created a new dedicated test for google default creds. This PR does that and also gets rid of the now-unneeded (we thought they would be needed earlier) OAuth test scenarios with plain ALTS.
2019-01-29 11:49:49 -08:00
Menghan Li 6086f8d68f
examples: reflection (#2594) 2019-01-25 15:35:01 -08:00
Doug Fawley 6d855749cf
travis: add Go 1.12beta2 to CI (#2598) 2019-01-25 13:07:43 -08:00
Ian Lance Taylor 0e8a6f931c credentials: add TLS 1.3 cipher suites (#2596)
This lets the tests pass with Go1.12beta2.
2019-01-25 08:47:38 -08:00
Can Guler 9225666342
Modified binary search for the correct delay. (#2584)
* Binary search for the correct delay.

* Removes an unnecessary log line.

* Fixes.

* Switches back to linear search.

* Replaces cancel with a timeout.
2019-01-23 14:49:11 -08:00
shaun e9c1ac35ec fix: typos (#2591) 2019-01-23 09:59:48 -08:00
Wu Kai 4cad6a6283 comment: default MaxSendMsgSize should be math.MaxInt32 instead of 4MB (#2586) 2019-01-22 10:48:59 -08:00
Menghan Li ec9c18c8c6
internal: split StateRecordingBalancer in test to balancer and builder (#2578)
And instead of setting state notify channel in balancer, create a new notify
channel at Build.

fixes #2576
2019-01-18 10:21:46 -08:00
Doug Fawley 9f93218b13
cleanup: update staticcheck to version supporting modules and new checkers (#2583) 2019-01-17 16:27:42 -08:00
Doug Fawley d7e8e3da0d
cleanup: remove staticcheck exception (#2582) 2019-01-17 10:24:42 -08:00
Doug Fawley 9572bbe0f9
cleanup: remove unused symbols (#2581) 2019-01-17 10:14:45 -08:00
Doug Fawley efaac52355
roundrobin: randomize starting address when rebuilding the picker (#2579) 2019-01-17 09:17:03 -08:00
Doug Fawley 59acad4c45
cleanup: more simplifications (#2574) 2019-01-16 13:07:56 -08:00
Doug Fawley 4e92c060da
cleanup: replace unnecessary loops (#2573) 2019-01-16 13:06:58 -08:00
Doug Fawley dfd7708d35
cleanup: use time.Until(t) instead of t.Sub(time.Now) (#2571) 2019-01-15 16:09:50 -08:00
Doug Fawley 38b35dcb7c
cleanup: lower-case starting character of error strings (#2572) 2019-01-15 16:09:35 -08:00
lyuxuan a1ead1ef6c
Change version to 1.19.0-dev (#2569) 2019-01-15 13:34:07 -08:00
Doug Fawley 6cc789b34b
client: make handshake required 'on' by default, not 'hybrid' (#2565) 2019-01-15 09:19:32 -08:00
Doug Fawley 98a94b0cb0
test: disable leakcheck after the first failure (#2563) 2019-01-14 15:40:20 -08:00
Doug Fawley f647b6facb
grpctest: defer Teardown to guarantee it is run even after t.Fatal (#2562) 2019-01-14 15:22:43 -08:00
Can Guler 9e7c146356
Return nil trailer metadata, if the RPC's status is context canceled. (#2554)
* Closes the client transport stream, if context is cancelled while recvBuffer is reading.

* Passes a function pointer to recvBufferReader, instead of a Stream and an http2Client.

* Adds more descriptive error messages.

* If waitOnHeader notices the context cancelation, shouldRetry no longer returns a ContextError. Instead, it returns the error from the last try.

* Makes sure that test gets both statuses at least 5 times.

* Makse cntPermDenied a lambda function.
2019-01-14 10:59:44 -08:00
Can Guler 954fe27324
benchmark: Unconstrained streaming benchmark (#2512)
* Adds unconstrained streaming benchmarks.
* Adds throughput to all scenarios.
* Adds comment to exported function.
* Adds comment to the new rpc.
* Adds a new run mode for unconstrained benchmarks.
* Converts counters to uint64s.
* Decreases default warm up time.
* Addresses PR comments.
* Deletes an unnecessary select/case
* Explains the use of RecvMsg rather than Recv.
2019-01-11 17:37:31 -08:00
Doug Fawley bd0b3b2aa2
grpctest: fix comments to be more readable (#2555) 2019-01-09 15:32:22 -08:00
Jean de Klerk 253dfbcf7d
internal: use -go option to target 1.9 (#2550)
Staticcheck has a -go option which I _believe_ was recently added. This allows
us to pin to 1.9, preventing staticcheck from recommending we optimize to an
overly-recent version of Go.
2019-01-09 15:26:59 -08:00
Doug Fawley b6f0a0f3fc
grpctest: add example to show how it is used (#2552) 2019-01-09 12:52:40 -08:00
Masahiro Sano 8fd063a5aa channelz: Implement GetServer method for channelz (#2537) 2019-01-09 10:50:34 -08:00
Jean de Klerk 76cc50721c
internal: rewrite TestDialWithMultipleBackendsNotSendingServerPreface (#2438)
- Remove the slice of servers approach, since there's specific
logic at server 2 that's different from server 1. This has the
advantage of making the test more readable without sacrificing
anything (given the previous point).

- Defer server close at initialization time instead of at the
end.

- Remove a time.Sleep(time.Second): use timeout + select around
serverDone instead.

- Use a goroutine to keep the connection reading, instead of
using a for loop in the server goroutine. This causes the
defer close(server2Done) to happen immediately after preface
is sent, which combined with the aforementioned time.Sleep
removal causes the test to go from 1.00s to ~0.05s.
2019-01-08 16:48:09 -08:00
Doug Fawley 0a391ff2b7
grpctest: add new package to manage tests and support per-test setup/teardown (#2523)
- Migrate `grpc` & `grpc/test` packages to use `Teardown` support to guarantee `leakcheck` is used
2019-01-07 14:24:56 -08:00
Sebastiaan van Stijn e441557ee9 rpc_util: update deprecated messages (#2545)
The status package now has `Convert()` and `Code()` utilities.

This patch updates the deprecation description for `ErrorDesc()` and
`Code()` to recommend using those functions, and forward the deprecated
functions to use the `status.Code()` and `status.Convert()` functions.
2019-01-07 13:45:27 -08:00
cheng wei 98de7e24ac internal: change split2() comment to be consistent with behavior (#2547) 2019-01-07 10:14:06 -08:00
lyuxuan c71aa62423
example: interceptor (#2541)
fix #2483
2019-01-02 10:33:06 -08:00
Menghan Li 36f3126920
example: name_resolving (#2514) 2018-12-27 14:30:17 -08:00
Menghan Li 2197c7b0de
example: load_balancing (#2504) 2018-12-27 14:29:52 -08:00
lyuxuan 0a3dc64b95
example: debugging (#2536)
fixes #2491
2018-12-27 14:03:13 -08:00
Ning Xie 3961168004 enhance log for hello world SayHello (#2538)
This PR adds a log to `SayHello`. This makes server logic more clear.
2018-12-27 12:40:13 -08:00
Menghan Li 7b14136291
health: resume health server (#2528) 2018-12-26 10:44:53 -08:00
Can Guler 25de51fc02
example: errors (#2534)
* Adds readme.

* Fills readme.

* Adds readme.

* Moves error examples.

* Adds port flag.

* Changes the flag for clients.

* Adds package comments.
2018-12-21 16:55:49 -08:00
Doug Fawley f286604fb2 example: cancellation (#2525) 2018-12-21 15:45:49 -08:00
lyuxuan 2cb2074db0
example: authentication (#2531) 2018-12-21 14:43:20 -08:00
Doug Fawley adac1aeabd
example: compression (#2527) 2018-12-21 13:55:59 -08:00
Can Guler 30155c0ba1
example: errors (#2521)
* Adds readme.

* Fills readme.

* Adds readme.
2018-12-20 17:55:12 -08:00
Masahiro Sano 1838dedee3 channelz: respect max_results in listing methods (#2516) 2018-12-20 13:53:39 -08:00
Menghan Li 463950a151
internal: example flag.Parse() and comments (#2526) 2018-12-20 12:43:38 -08:00
lyuxuan d9bc55b745
example: encryption (#2524)
fixes #2487
2018-12-19 16:45:46 -08:00