1126 Commits

Author SHA1 Message Date
e5f60381dd lowercase credential keys 2016-03-22 11:33:19 -07:00
2dc70c28da Merge pull request #596 from enisoc/errorf
Don't treat StatusDesc() as a format string.
2016-03-22 11:11:59 -07:00
896247136f Merge pull request #598 from iamqizhao/master
Specialize http2.StreamError when the server reads frames
2016-03-22 11:07:08 -07:00
a31af4bde2 Add some comments to the new test. 2016-03-22 10:56:29 -07:00
a098b2c182 Specialize http2.StreamError when the server reads frames 2016-03-21 18:23:30 -07:00
a294a45ba0 Don't treat StatusDesc() as a format string.
For example, if the error message contains "%v", then passing
StatusDesc() as the format string to Errorf() will replace "%v" with
"%!v(MISSING)".
2016-03-19 17:15:21 -07:00
d3ddb4469d Merge pull request #595 from vieux/typos
fix a few typos
2016-03-17 10:50:43 -07:00
047af78181 fix a few typos 2016-03-16 16:40:16 -07:00
75cc451428 Merge pull request #593 from dsymonds/prbot-gofmt
gofmt everything
2016-03-16 10:40:56 -07:00
a0594a1683 Run gofmt over Go source files. 2016-03-16 15:11:58 +11:00
986912c907 Merge pull request #590 from petermattis/pmattis/context-with-stream
transport: remove unnecessary allocation
2016-03-09 11:37:48 -08:00
ef489cba5c Merge pull request #591 from petermattis/pmattis/buffered-reader
Use a bufio.Reader for input.
2016-03-09 11:35:03 -08:00
a1d076a617 Use a bufio.Reader for input.
This reduces the number of system calls for reading network data,
providing a nice speedup when there are concurrent RPCs.
2016-03-09 12:07:58 -05:00
8b936e927a transport: remove unnecessary allocation
Storing an integer in an interface requires an allocation. Storing an
empty struct does not. This matches the pattern used for peer.NewContext
and metadata.NewContext.
2016-03-09 10:27:53 -05:00
b1439a2743 Merge pull request #522 from dsymonds/master
Prepare for adding a compatibility marker to proto generated code.
2016-03-07 12:19:07 -08:00
710dbc764f Prepare for adding a compatibility marker to proto generated code.
This will assert at build time that the generated code is compatible
with the grpc package that it is linked to. A future change in the
grpc plugin for protoc-gen-go will generate a line like
	const _ = grpc.SupportPackageIsVersion1

This constant will be renamed in the future when incompatible changes
are made that require synchronised updates to grpc and protoc-gen-go.
2016-03-07 10:12:28 +11:00
fea7689493 Merge pull request #584 from bradfitz/h2
Simplify server setup when testing the http.Handler-based server transport
2016-03-02 10:59:35 -08:00
18b2da6250 Simplify server setup when testing the http.Handler-based server transport
This simplifies the code that's used for wiring up the http.Handler-based
transport for testing. It's not used outside of tests.

http2.Server.ServeConn was added somewhat recently for other reasons and
I just realized it would simplify this code as well.
2016-03-02 18:49:23 +00:00
0e69ad1ebd Merge pull request #580 from iamqizhao/master
Fix err handling of malformed http2
2016-03-01 11:42:18 -08:00
f3c6dc545f Fix err handling of malformed http2
polish the commit
2016-03-01 10:52:13 -08:00
b4b62c5f29 Merge pull request #571 from bradfitz/internal
Remove test-only methods from grpc package.
2016-02-26 14:33:54 -08:00
b88c12e7ca Merge pull request #570 from bradfitz/meta
transport: use http2.Framer's MetaHeadersFrame functionality
2016-02-26 13:37:15 -08:00
7459645a33 Merge pull request #574 from iamqizhao/master
Skip all goroutines in C code for the leak detection
2016-02-26 10:49:11 -08:00
b4adf7d359 Merge pull request #573 from bradfitz/no_cover
Disable the code coverage checker.
2016-02-25 18:35:59 -08:00
a5e4790bfe coalesce runtime_mcall cases 2016-02-25 17:36:29 -08:00
d5c0571ebc skip all goroutines in C code for the leak detector 2016-02-25 16:55:22 -08:00
8a7d92a735 Merge pull request #572 from iamqizhao/master
Add more uninteresting goroutines for the leak detector
2016-02-25 16:09:25 -08:00
3ecc13ec96 Disable the code coverage checker.
It's too noisy and not worth it. I don't like encouraging the code
coverage game, wherein people write bad tests to get points.
It's annoying to get a red X in the PR status when coverage dropped
by 1 line or 0.4%.

Good code review should be sufficient to verify we have both tests
and good tests.
2016-02-26 00:02:08 +00:00
ac5c8d7972 transport: use http2.Framer's MetaHeadersFrame functionality
The Framer now has support for merging HEADERS+CONTINUATION frames.
This remove the frame merging & hpack state machine from grpc.

In addition to being more compliant with the spec, this also means
gRPC enforces the header list size, removing a DoS vector.

Change-Id: Id46a6a1e741e62a859c3e3fb9f0cc36febf1d836
2016-02-25 23:44:45 +00:00
47353752e9 add more uninteresting goroutines for the leak detector 2016-02-25 14:03:22 -08:00
0f80f5b995 Remove test-only methods from grpc package.
Move the test-only methods to a new internal package so as to not
pollute the godoc, and to prevent people from using them. (Packages
named internal or under internal are private, and enforced by the go
tool)
2016-02-25 13:30:19 -08:00
89f694edb4 Merge pull request #569 from bradfitz/error_map
Fix crashes where transports returned errors unhandled by the message parser
2016-02-24 18:22:25 -08:00
110fd99e30 Fix crashes where transports returned errors unhandled by the message parser.
The http.Handler-based transport body reader was returning error types
not understood by the recvMsg parser. See #557 for some background and
examples.

Fix the http.Handler transport and add tests. I copied in a subset of
the http2 package's serverTest type, adapted slightly to work with
grpc. In the process of adding tests, I discovered that
ErrUnexpectedEOF was also not handled by the regular server
transport. Document the rules and fix that crash as well.

Unrelated stuff in this CL:

* make tests listen on localhost:0 instead of :0, to avoid Mac firewall
  pop-up dialogs.

* rename parser.s field to parser.r, to be more idiomatic that it's an
  io.Reader and not anything fancier. (it's not acting like type
  stream, even if that's the typical concrete type)

* move 5 byte temp buffer into parser, rather than allocating it for
  each new message. (drop in the bucket improvement in garbage; more
  to do later)

* rename http2RSTErrConvTab to http2ErrConvTab, per Qi's earlier
  CL. Also add the HTTP/1.1-required error mapping for completeness,
  not that it should ever arise with gRPC, also per Qi's earlier CL
  referenced in #557.
2016-02-24 15:09:17 -08:00
4d5449a400 Merge pull request #568 from iamqizhao/master
Add more uninteresting goroutines for the leak checker
2016-02-23 18:29:23 -08:00
3657de165d Merge pull request #567 from pquerna/log_handshake_error
log error message and source address in handshake error
2016-02-23 16:02:59 -08:00
91254844e8 add more uninteresting goroutines for leak checker 2016-02-23 16:01:42 -08:00
75fe76716d log error message and source address in handshake error 2016-02-23 11:14:03 -08:00
f1af61b295 Merge pull request #565 from iamqizhao/master
Always close tracing when a streaming rpc goes wrong.
2016-02-23 10:46:04 -08:00
5085c7628d Always close tracing when a stream goes wrong 2016-02-22 18:02:10 -08:00
19b24c3042 Merge pull request #564 from iamqizhao/master
Fix a race between transport creation and wait returning
2016-02-22 17:50:41 -08:00
0be94ab3f5 fix a race between transport creation and wait returning 2016-02-22 16:26:15 -08:00
74d8091165 Merge pull request #563 from iamqizhao/doc
fix the grpc website url
2016-02-22 13:07:33 -08:00
cbf3e92183 Merge pull request #560 from iamqizhao/health
change health check package name
2016-02-22 11:32:06 -08:00
a5125ecf39 fix the grpc website url 2016-02-19 11:56:12 -08:00
3839435526 change health check package name 2016-02-18 13:10:06 -08:00
178b68e281 Merge pull request #556 from bradfitz/testcleanup
test: improve test readability; use newTest helper everywhere
2016-02-17 15:38:44 -08:00
b1097423a0 test: improve test readability; use newTest helper everywhere
This removes serverSetUp and clientSetUp. They had too many positional
parameters and weren't readable at the call sites.

With this change, it's now much more obvious how a test differs from
others just be looking at what is tinkered with after newTest.

Change-Id: I59bb06f8029af166002033f2c3f7b8f0b2d20940
2016-02-16 11:15:16 +00:00
01de3de50a Merge pull request #546 from bradfitz/quiet
test: reduce end2end log spam
2016-02-16 01:02:10 -08:00
0080e0eda0 Merge pull request #552 from bradfitz/concurrency
Fix flakiness of TestCancelNoIO with http.Handler-based server transport
2016-02-12 17:16:34 -08:00
ffa8131f46 test: reduce end2end log spam
Filter expected log output by default, unless a flag is provided, or a
test fails.

This makes it possible to see unexpected things. Having noisy tests
makes it too easy to miss actual problems.
2016-02-13 00:33:23 +00:00