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.
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.
- 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
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/15078https://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.
- .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"
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.
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).
- 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
- 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.
* 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