Commit Graph

121 Commits

Author SHA1 Message Date
Doug Fawley 0af5a164e0
grpc: fix bug causing an extra Read if a compressed message is the same size as the limit (#8178) 2025-03-18 15:08:29 -07:00
Doug Fawley 5668c66bc6
resolver/manual: allow calling UpdateState with an un-Built resolver (#8150) 2025-03-06 13:39:48 -08:00
janardhanvissa 52a257e680
cleanup: replace dial with newclient (#7967) 2025-02-27 16:03:14 -08:00
janardhanvissa 8528f4387f
cleanup: replace Dial with NewClient (#7975) 2025-02-17 12:39:40 +05:30
Doug Fawley 3409a56e78
cleanup: rename fields for clarity (#8043) 2025-01-28 07:55:05 -08:00
Arjan Singh Bal 00b9e140ce
pickfirst: New pick first policy for dualstack (#7498) 2024-10-10 09:33:47 +05:30
Nathan Baulch 3b626a7b52
*: fix more typos (#7619) 2024-09-16 10:58:27 -07:00
Nathan Baulch c8951abc16
*: fix minor typos (#7487)
* Fix typos

* Fix reflecton tests
2024-08-14 22:43:01 +05:30
Arvind Bright c267d5bbeb
grpc: add clientconn.CanonicalTarget() to return the canonical target string (#7006) 2024-02-28 11:07:49 -08:00
Zach Reyes 3ae77e6528
grpc: Canonicalize string returned by ClientConn.Target() and resolver.Address.String() (#6923) 2024-02-15 15:26:14 -05:00
Easwar Swaminathan 1880bd6ff3
resolver/manual: support restarts, required for channel idleness (#6638) 2023-09-15 10:47:11 -07:00
Doug Fawley 8f51ca8f58
tests: stop using UpdateSubConnState (#6527) 2023-08-09 13:56:05 -07:00
Doug Fawley d06ab0d4b9
pickfirst: receive state updates via callback instead of UpdateSubConnState (#6495) 2023-08-04 08:14:18 -07:00
Anirudh Ramachandra fc0aa4689c
client: encode the authority by default (#6428) 2023-07-10 14:48:27 -07:00
Easwar Swaminathan 9b7a947cdc
grpc: support channel idleness (#6263) 2023-05-22 12:42:45 -07:00
大可 d655f404da
internal/transport: fix severity of log when receiving a GOAWAY with error code ENHANCE_YOUR_CALM (#5935) 2023-02-08 16:36:09 -05:00
Arvind Bright e9d9bd0436
tests: reduce the degree of stress testing in long running tests (#6003) 2023-02-08 13:03:14 -08:00
Easwar Swaminathan 57aaa10b8a
test: move clientconn state transition test to test/ directory (#5551) 2022-08-02 12:31:30 -07:00
Menghan Li 30b9d59a76
client/SubConn: do not recreate addrConn if UpdateAddresses is called with the same addresses (#5373) 2022-05-20 15:17:29 -07:00
Easwar Swaminathan 0066bf69de
grpc: perform graceful switching of LB policies in the `ClientConn` by default (#5285) 2022-04-01 13:14:35 -07:00
Easwar Swaminathan 42cadc171d
test: cleanup balancer switching tests (#5271) 2022-03-30 12:58:41 -07:00
Easwar Swaminathan eead9a824c
grpc: delete deprecated API WithBalancerName() (#5232) 2022-03-10 13:15:11 -08:00
Shihao Xia 2fb1ac854b
test: fix potential goroutine leak in TestUpdateAddresses_RetryFromFirstAddr (#5023) 2022-01-05 10:38:18 -08:00
Shihao Xia 7c8a9321b9
testing: fix goroutine leak in TestClientUpdatesParamsAfterGoAway (#5024) 2021-12-14 15:44:54 -08:00
Easwar Swaminathan dd767416a6
grpc: implement WithInsecure() using the insecure package (#4718) 2021-11-09 15:42:07 -08:00
Doug Fawley 69e1b54deb
test: fix stayConnected to call Connect after state reports IDLE (#4821) 2021-10-01 11:09:12 -07:00
Easwar Swaminathan 78d3aa8b3e
grpc: cleanup parse target and authority tests (#4787) 2021-09-23 07:43:14 -07:00
Doug Fawley 5f4bc66745
grpc: fix stayConnected function to connect upon entry (#4699)
If stayConnected was called while the ClientConn was in IDLE already, it would
never call Connect, and stay stuck in that state.  This change ensures
cc.Connect is always called at least once.
2021-08-24 13:52:18 -07:00
Doug Fawley 997ce619eb
clientconn: do not automatically reconnect addrConns; go idle instead (#4613) 2021-08-10 13:22:34 -07:00
Dustin Ward 2d3b1f900e
grpc: prevent deadlock in Test/ClientUpdatesParamsAfterGoAway on failure (#4534) 2021-06-11 09:48:03 -07:00
Easwar Swaminathan fd393c8989
testdata: Update testdata certs. (#3786)
* This will be used in certprovider tests where we would want more than one server and client certs.
* Also, updated existing usages of these certs to point to the new  files.
* Also copy over the required certs/key files. This avoids the example gomodule from depending on gRPC testdata package which should be able to change independently.
* Fix interop test's SAN.
2020-08-05 09:55:07 -07:00
Aliaksandr Mianzhynski 4258d12073
service config: add default method config support (#3684) 2020-07-06 17:56:02 -07:00
Zou Nengren 4e63bcab52
test: replace manual.GenerateAndRegisterManualResolver with grpc.WithResolvers (#3700) 2020-06-23 09:49:44 -07:00
Doug Fawley 4eb418e5b2
balancer: move Balancer and Picker to V2; delete legacy API (#3431) 2020-04-28 14:52:49 -07:00
sethp-nr b02de00073
client: option to surface connection errors to callers (#3430)
This commit allows blocking clients to receive a more informative error
message than "context deadline exceeded", which is especially helpful in
tracking down persistent client misconfiguration (such as an invalid TLS
certificate, an invalid server that's refusing connections, etc.)
2020-04-09 13:45:13 -07:00
Doug Fawley 0083f6eefc
client: add WithResolvers options for specifying client-local resolvers (#3320) 2020-01-14 12:44:21 -08:00
Doug Fawley c35a580b0c
Revert "balancer: move Balancer and Picker to V2; delete legacy… (#3315)
This reverts commit 336cf8d761.
2020-01-13 13:12:55 -08:00
Doug Fawley 336cf8d761
balancer: move Balancer and Picker to V2; delete legacy API (#3301) 2020-01-10 13:44:48 -08:00
Doug Fawley c0909e91a5
resolver: move dns and passthrough to internal (#3116)
Nobody should directly need to reference these packages.

This is technically a breaking change. However:

- Package dns was exporting a NewBuilder method. This should never have been necessary to use, but if so, it can be replaced by importing the "grpc" package and then using resolver.Get("dns").

- Package passthrough was not exporting any symbols and there was never a need to even blank-import it.

After as much searching as possible, it appears nobody in the open source community is referencing either of these packages.
2019-10-22 13:01:54 -07:00
Doug Fawley ed563a02ea
resolver: add State fields to support error handling (#2951) 2019-10-04 12:59:43 -07:00
Easwar Swaminathan 31911ed09e
client: add WithConnectParams to configure connection backoff and timeout (#2960)
* Implement missing pieces for connection backoff.

Spec can be found here:
https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md

Summary of changes:
* Added a new type (marked experimental), ConnectParams, which contains
  the knobs defined in the spec (except for minConnectTimeout).
* Added a new API (marked experimental), WithConnectParams() to return a
  DialOption to dial with the provided parameters.
* Added new fields to the implementation of the exponential backoff in
  internal/backoff which mirror the ones in ConnectParams.
* Marked existing APIs WithBackoffMaxDelay() and WithBackoffConfig() as
  deprecated.
* Added a default exponential backoff implementation, for easy use of
  internal callers.

Added a new backoff package which defines the backoff configuration
options, and is used by both the grpc package and the internal/backoff
package. This allows us to have all backoff related options in a
separate package.
2019-10-03 16:47:13 -07:00
Zeming YU 6d6c0413c7 test: fix race reading while incrementing (#2935)
Swap the `<-done` and `if numConns < 2` to make sure `numConns++` happens before read
2019-07-25 10:54:14 -07:00
Doug Fawley 24b2fb8959
client: remove option to send RPCs before HTTP/2 handshake is completed (#2904) 2019-07-12 13:37:27 -07:00
Doug Fawley d40a995895
balancer/resolver: add loadBalancingConfig and pre-parsing support (#2732) 2019-05-30 09:12:58 -07:00
David Drysdale d37bd82db6 Fix DialContext when using a timeout (#2737)
Fixes #2736
2019-04-04 09:58:15 -07:00
lyuxuan ea5e6da287
service config: default service config (#2686) 2019-04-03 10:50:28 -07:00
Doug Fawley 3910b873d3
bar: add ability to update resolver state atomically and pass directly to the balancer (#2693) 2019-03-22 10:48:55 -07:00
Jean de Klerk d021e89b3f
internal: fix Dial_OneBackoffPerRetryGroup (#2689)
* internal: fix Dial_OneBackoffPerRetryGroup

Instead of mutating global variables, switches getMinConnectDeadline to a
dial option.

Fixes #2687.

* rename getMinConnectTimeoutFunc to minConnectTimeout, ditto dial opt
2019-03-20 13:58:29 -06:00
Jean de Klerk 5878d965b2
transport: remove RequireHandshakeHybrid support (#2529)
This removes RequireHandshakeHybrid support and changes the default behavior
to RequireHandshakeOn. Dial calls will now block and wait for a successful
handshake before proceeding. Users relying on the old hybrid behavior (cmux
users) should consult https://github.com/soheilhy/cmux/issues/64.

Also, several tests have been updated to take this into consideration by
sending settings frames.
2019-02-27 11:04:46 -07:00
Doug Fawley ed70822b12 keepalive: apply minimum ping time of 10s to client and 1s to server (#2642)
* keepalive: apply minimum ping time of 10s to client and 1s to server

* review fixes
2019-02-21 13:09:37 -08:00