-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace usages of grpc.Dial with grpc.NewClient * Propagate errors in rlp log client streaming Propogates errors received from the rlp via gRPC when sending requests. Now that we don't block on dialing the server, we need to handle errors at the sending requests level. * chore: Make pool tests pass Fixes the failing pool tests in `plumbing` and `rlp/internal/ingress` following the change to use `grpc.NewClient` instead of `grpc.Dial`. This is because they were testing that connections were initiated when a new doppler was added. However, with the change to NewClient, connections won't be made until the resulting grpc client connections are used for RPC. This also means that dopplers may be added to the pool map when in the past they would not be added due to the connection on Dial failing. One approach to getting the existing tests to pass would have been to call `Connect` on the grpc client connections to force them to leave idle mode. However, `Connect` is experimental, and really gRPC is encouraging us not to care about the connection state when creating client connections. To fix the tests we ended up just asserting on the pool size. One downside of this was that we couldn't see a nice way to assert that `Close` was called on the gRPC client connection when `Close` was called for a doppler address. We could have replaced the connection creation with an interface and mocked that but it didn't seem worth it. --------- Signed-off-by: Andrew Crump <andrew.crump@broadcom.com> Signed-off-by: Carson Long <12767276+ctlong@users.noreply.github.com> Signed-off-by: Rebecca Roberts <rebecca.roberts@broadcom.com>
- Loading branch information
Showing
15 changed files
with
108 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.