2852 Commits

Author SHA1 Message Date
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
8e6533ee6e client: clean up v1 balancer wrapper error handling (#2511) 2019-01-30 10:56:23 -08:00
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
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
6086f8d68f examples: reflection (#2594) 2019-01-25 15:35:01 -08:00
6d855749cf travis: add Go 1.12beta2 to CI (#2598) 2019-01-25 13:07:43 -08:00
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
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
e9c1ac35ec fix: typos (#2591) 2019-01-23 09:59:48 -08:00
4cad6a6283 comment: default MaxSendMsgSize should be math.MaxInt32 instead of 4MB (#2586) 2019-01-22 10:48:59 -08:00
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
9f93218b13 cleanup: update staticcheck to version supporting modules and new checkers (#2583) 2019-01-17 16:27:42 -08:00
d7e8e3da0d cleanup: remove staticcheck exception (#2582) 2019-01-17 10:24:42 -08:00
9572bbe0f9 cleanup: remove unused symbols (#2581) 2019-01-17 10:14:45 -08:00
efaac52355 roundrobin: randomize starting address when rebuilding the picker (#2579) 2019-01-17 09:17:03 -08:00
59acad4c45 cleanup: more simplifications (#2574) 2019-01-16 13:07:56 -08:00
4e92c060da cleanup: replace unnecessary loops (#2573) 2019-01-16 13:06:58 -08:00
dfd7708d35 cleanup: use time.Until(t) instead of t.Sub(time.Now) (#2571) 2019-01-15 16:09:50 -08:00
38b35dcb7c cleanup: lower-case starting character of error strings (#2572) 2019-01-15 16:09:35 -08:00
a1ead1ef6c Change version to 1.19.0-dev (#2569) 2019-01-15 13:34:07 -08:00
6cc789b34b client: make handshake required 'on' by default, not 'hybrid' (#2565) 2019-01-15 09:19:32 -08:00
98a94b0cb0 test: disable leakcheck after the first failure (#2563) 2019-01-14 15:40:20 -08:00
f647b6facb grpctest: defer Teardown to guarantee it is run even after t.Fatal (#2562) 2019-01-14 15:22:43 -08:00
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
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
bd0b3b2aa2 grpctest: fix comments to be more readable (#2555) 2019-01-09 15:32:22 -08:00
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
b6f0a0f3fc grpctest: add example to show how it is used (#2552) 2019-01-09 12:52:40 -08:00
8fd063a5aa channelz: Implement GetServer method for channelz (#2537) 2019-01-09 10:50:34 -08:00
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
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
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
98de7e24ac internal: change split2() comment to be consistent with behavior (#2547) 2019-01-07 10:14:06 -08:00
c71aa62423 example: interceptor (#2541)
fix #2483
2019-01-02 10:33:06 -08:00
36f3126920 example: name_resolving (#2514) 2018-12-27 14:30:17 -08:00
2197c7b0de example: load_balancing (#2504) 2018-12-27 14:29:52 -08:00
0a3dc64b95 example: debugging (#2536)
fixes #2491
2018-12-27 14:03:13 -08:00
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
7b14136291 health: resume health server (#2528) 2018-12-26 10:44:53 -08:00
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
f286604fb2 example: cancellation (#2525) 2018-12-21 15:45:49 -08:00
2cb2074db0 example: authentication (#2531) 2018-12-21 14:43:20 -08:00
adac1aeabd example: compression (#2527) 2018-12-21 13:55:59 -08:00
30155c0ba1 example: errors (#2521)
* Adds readme.

* Fills readme.

* Adds readme.
2018-12-20 17:55:12 -08:00
1838dedee3 channelz: respect max_results in listing methods (#2516) 2018-12-20 13:53:39 -08:00
463950a151 internal: example flag.Parse() and comments (#2526) 2018-12-20 12:43:38 -08:00
d9bc55b745 example: encryption (#2524)
fixes #2487
2018-12-19 16:45:46 -08:00
1b41b79fd1 internal: refactor transport to single retry mechanism (#2461)
Previously, the transport was able to reset via the retry loop,
or via the event closures calling resetTransport. This meant
a very large amount of synchronization was necessary: one
reset meant the other had to not reset; state had to be kept
at the addrconn; and very subtle interactions were hard to
reason about.

This change removes the ability for event closures to directly
reset the transport. Instead, they signal to to the retry
loop about the event, and the retry loop is always the single
place that retries occur.

This also allows us to refactor the address switching logic
into a much simpler for loop inside the retry loop instead of
using addrConn state to keep track of an index.
2018-12-17 13:10:13 -08:00
42df0c551e examples: deadline (#2494)
* Deadliner service

* Works.

* Uses helloworld.proto.

* Style fix

* Comments

* Uses Echo service and adds streaming example.

* Addresses the comments.

* Adds an error.

* Addresses PR comments.

* Removes port parameter from a function.
2018-12-14 15:36:21 -08:00
5da252b6a6 health check test: prevent double close of hcEnterChan (#2441) 2018-12-13 16:44:36 -08:00