dapr / dapr/rust-sdk

Handle the logic to retry until grpc port is assigned to daprd

Open
#14 4 comments 0 reactions 0 assignees View on GitHub
enhancement P1 pinned
Dominant language
Rust
Stars
252
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Right now we have to [introduce some delay](https://github.com/dapr/rust-sdk/blob/issue_11/examples/client.rs#L12) in clients so that a grpc port is assigned to daprd before the client tries to make a connection. The logic to handle this issue needs to be handled in the sdk instead.

Logs for this issue when delay is not introduced in client:
```bash
$ dapr run --app-id=rustapp --grpc-port 3500 cargo run -- --example client
ℹ️ Starting Dapr with id rustapp. HTTP Port: 38035. gRPC Port: 3500

== APP == Error: TransportError
```

Contributor guide

Open the contributing guide

Research direction

Start with examples/client.rs, especially the delay currently used before connecting, and reproduce the documented dapr run command without that delay. Trace the SDK's connection setup and determine where it can retry while daprd's gRPC port becomes available. Done means the example connects successfully without a client-side delay and the retry behavior is covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, rust
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.