[#1441] cli: Use grpc.WaitForReady
while initializing SDK client
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 2m59s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m11s
DCO action / DCO (pull_request) Successful in 3m29s
Build / Build Components (pull_request) Successful in 3m35s
Tests and linters / Staticcheck (pull_request) Successful in 3m29s
Tests and linters / gopls check (pull_request) Successful in 5m9s
Tests and linters / Run gofumpt (pull_request) Successful in 5m14s
Tests and linters / Lint (pull_request) Successful in 8m18s
Tests and linters / Tests (pull_request) Successful in 9m29s
Tests and linters / Tests with -race (pull_request) Successful in 9m34s
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 2m59s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m11s
DCO action / DCO (pull_request) Successful in 3m29s
Build / Build Components (pull_request) Successful in 3m35s
Tests and linters / Staticcheck (pull_request) Successful in 3m29s
Tests and linters / gopls check (pull_request) Successful in 5m9s
Tests and linters / Run gofumpt (pull_request) Successful in 5m14s
Tests and linters / Lint (pull_request) Successful in 8m18s
Tests and linters / Tests (pull_request) Successful in 9m29s
Tests and linters / Tests with -race (pull_request) Successful in 9m34s
Before, when the target RPC server wasn't available, requests made by CLI didn't wait for a timeout specified by the '--timeout' option because of the default backoff strategy. Adding this option fixes that behavior. Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
parent
8b6ec57c61
commit
d673ed73ba
1 changed files with 1 additions and 0 deletions
|
@ -58,6 +58,7 @@ func GetSDKClient(ctx context.Context, cmd *cobra.Command, key *ecdsa.PrivateKey
|
|||
GRPCDialOptions: []grpc.DialOption{
|
||||
grpc.WithChainUnaryInterceptor(tracing.NewUnaryClientInteceptor()),
|
||||
grpc.WithChainStreamInterceptor(tracing.NewStreamClientInterceptor()),
|
||||
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
|
||||
},
|
||||
}
|
||||
if timeout := viper.GetDuration(commonflags.Timeout); timeout > 0 {
|
||||
|
|
Loading…
Reference in a new issue