Commit Graph

86 Commits

Author SHA1 Message Date
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 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
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 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
lyuxuan 5da252b6a6
health check test: prevent double close of hcEnterChan (#2441) 2018-12-13 16:44:36 -08:00
Doug Fawley f3eb5bc06e
client: add GRPC_GO_REQUIRE_HANDSHAKE options to control connection behavior (#2464)
Possible settings of this environment variable:

- "hybrid" (default; removed after the 1.17 release): do not wait for handshake before considering a connection ready, but wait before considering successful.

- "on" (default after the 1.17 release): wait for handshake before considering a connection ready/successful.

- "off": do not wait for handshake before considering a connection ready/successful.

This setting will be completely removed after the 1.18 release, and "on" will be the only supported behavior.
2018-11-26 15:06:46 -08:00
Doug Fawley 04ea82009c
cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08:00
Jean de Klerk 6572a802a1
internal: update golint to use new url (#2393) 2018-10-31 14:39:18 -06:00
Doug Fawley 1b1c45ef21
internal: vet cleanups (#2405)
- Take advantage of `grep`'s status code, where possible
- Make the appengine check in vet.go exit with non-zero status if an error is encountered
- Add "fail_on_output" for the `tee|read` that we do when the status code cannot be used, to make it clear what it's for
- Document all our various checks
2018-10-26 15:50:46 -07:00
Menghan Li 425c07e59b internal: add check for import of ptypes proto packages (#2396) 2018-10-26 09:40:02 -07:00
Jean de Klerk 30212c8423 internal: fix various problems in transport_test.go
Commit 35c3afad17 added a `defer cancel()` line
to transport_test. While this line is generally good, there happens to be a
Go 1.6 bug that when a context that gets passed into Dial is canceled, it
has a 50% chance to incorrectly causes all future Dial writes to fail.

This commit removes that defer and adds a comment explaining the situation.

https://github.com/golang/go/issues/15078
https://github.com/golang/go/issues/15035

This commit also fixes a perceived (by the race detector) racy use of
server.conn by making conn.Close happen inside the goroutine that
uses conn.

This commit also fixes a SIGSEV caused by an incorrect typed nil
check.
2018-09-24 10:46:24 -07:00
lyuxuan bd04c06895
vet: move go_vet directory under test directory (#2310) 2018-09-17 15:03:21 -07:00
lyuxuan 46ee6abebf
import check for appengine environment(#2215) 2018-09-10 17:32:46 -07:00
dfawley ba4eb68a02
Travis/Makefile/vet cleanups (#2283)
- .travis.yml:
  - Download dependencies at install time
  - Run race and non-race in separate instances
  - Use braces around env var names
- vet.sh:
  - Run `go mod tidy` to keep it tidy
  - Stop filtering transport errors from go/vet output
  - Use braces around env var names
- Makefile:
  - Reorder alphabetically
  - Add "vetdeps" as a dependency of "vet"
  - Add "testappengine" to "all"
2018-09-04 15:10:01 -07:00
dfawley ce4f3c8a89
Initial go.mod module definition and corresponding Travis/vet.sh changes (#2281) 2018-08-31 12:58:30 -07:00
Menghan Li 59dd9b3f19
test: add go 1.11 to travis and remove go 1.7 (#2278) 2018-08-27 13:31:20 -07:00
dfawley 11b582728a
transport: move to internal to make room for new, public transport API (#2212)
This is a breaking change, but the transport package was never intended for use outside of grpc.  Any current users that we are aware of are incorrect or have a preferred alternative.
2018-07-11 11:22:45 -07:00
dfawley f3361fda2f
internal: changes to travis to make it do less work (#2200)
This PR removes race testing from all travis runs except go1.10 except during nightlies.

|                 | Before* | After** | % Change |
| --------------- | ------- | ------- | -------- |
| Total runtime   | 65m     | 45m     | -31%     |
| Wall-clock time | 21m     | 11.5m   | -45%     |

*: (one random sample I found in our PRs)
**: (latest run on this PR)

Also includes some organization changes (making proper use of `before_install` and `install`) / cleanups in `.travis.yml` to make it easier to understand.  As a result, we now stop unintentionally running `vet` on a second build by accident (go1.10 with retry enabled).
2018-07-06 11:09:40 -07:00
dfawley bd7f82c7b1
internal/grpcrand: New package for concurrency-safe randoms (#2106) 2018-05-29 09:06:35 -07:00
Jean de Klerk e9443916b5
internal: vet.sh quits when it sees macosx (#2048) 2018-05-02 16:47:25 -07:00
Menghan Li 66090d990b
vet: disallow importing "unsafe" (#2024) 2018-04-26 14:24:26 -07:00
Menghan Li 76b07ed73d
Mark old balancer and naming APIs as deprecated (#1951) 2018-04-05 13:12:31 -07:00
Menghan Li 47bddd7d06
vet: run golint on _string files (#1749)
We didn't run this because codes_string.go was generated by stringer. And we no longer use stringer.
2017-12-18 10:58:57 -08:00
Menghan Li b8191e57b2
remove stringer and go generate (#1715) 2017-12-06 17:35:20 -08:00
mmukhi ddbb27e545
client: backoff before reconnecting if an HTTP2 server preface was not received (#1648) 2017-12-01 09:55:42 -08:00
dfawley 816fa5b06f
Add proper support for 'identity' encoding type (#1664) 2017-11-17 09:24:54 -08:00
Menghan Li ebefec97dd
travis: fix GOARCH=386 and add misspell check (#1658)
- Define env variable RUN386 and set GOARCH later, instead of assigning to GOARCH directly. Otherwise, gimme will override GOARCH back
- Add misspell check
- Disable -race on 386
2017-11-08 13:40:05 -08:00
dfawley 08a4535419
vet.sh: don't check git status when doing -install (#1641) 2017-11-01 13:14:29 -07:00
Menghan Li 06233310cc Revert "Temporary disable staticcheck" (#1568) 2017-10-06 13:17:06 -07:00
dfawley c8405557a4 Remove Go1.6 support (#1492) 2017-10-04 13:57:10 -07:00
Menghan Li dc413bbc22 Temporary disable staticcheck (#1561) 2017-10-04 13:56:37 -07:00
dfawley 5a82377e69 transport: refactor of error/cancellation paths (#1533)
- The transport is now responsible for closing its own connection when an error
  occurs or when the context given to it in NewClientTransport() is canceled.

- Remove client/server shutdown channels -- add cancel function to allow
  self-cancellation.

- Plumb the clientConn's context into the client transport to allow for the
  transport to be canceled even after it has been removed from the ac (due to
  graceful close) when the ClientConn is closed.
2017-10-02 11:56:31 -07:00
dfawley 8afb9cb8f3 vet.sh: set PATH to force downloaded binaries to be run (#1529) 2017-09-20 11:19:09 -07:00
dfawley 91999f444f vet.sh: fix protoc installation (#1502) 2017-09-01 16:45:41 -07:00
dfawley d6870035ab Check "x/net/context" with `go vet` like "context" (#1490)
* Check "x/net/context" with `go vet` like "context"

Includes a signficant revamp of .travis.yml to execute a separate script for
all of the things we check before allowing a merge.

* fix bug in benchmain
2017-08-29 15:40:57 -07:00