Skip to content

Add standalone gRPC proxy invocation sample - #1927

Merged
WhitWaldo merged 5 commits into
dapr:masterfrom
RakeshCodeLab:samples/grpc-proxy-828
Oct 18, 2026
Merged

WhitWaldo merged 5 commits into
dapr:masterfrom
RakeshCodeLab:samples/grpc-proxy-828

Conversation

@RakeshCodeLab

Copy link
Copy Markdown
Contributor

Description

This adds a standalone example for calling a gRPC service through Dapr's proxy.

The client uses the existing Greeter proto and DaprClient.CreateInvocationInvoker to call grpcsample through its own sidecar. I also mapped the existing GreeterService, added a ten-second deadline and cancellation handling, and documented how to run both sidecars.

Validation:

  • Client and server builds passed on .NET 8, 9 and 10.
  • All 3 sample tests passed.
  • All 297 Dapr.Client tests passed on each framework.
  • Both Hello Ada and Hello Dapr worked through two real sidecars.
  • With the destination stopped, the client reported a gRPC error and exited with code 1.

Issue reference

Related to #828.

Checklist

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Expose the existing GreeterService and demonstrate generated-client
invocation through the caller's Dapr sidecar.

Add deadline and cancellation handling, routing and failure tests,
and instructions for running the example with two sidecars.

Related to dapr#828.

Signed-off-by: RakeshCodeLab <205911647+RakeshCodeLab@users.noreply.github.com>
@RakeshCodeLab
RakeshCodeLab requested review from a team as code owners October 6, 2026 21:09
@WhitWaldo WhitWaldo added this to the v1.19 milestone Oct 6, 2026
@RakeshCodeLab

Copy link
Copy Markdown
Contributor Author

I checked the failed integration job. Three existing GrpcProxyTests failed: two with connection refused at 127.0.0.1:37959, and the deadline test received Unavailable instead of DeadlineExceeded. The log shows grpcapp reporting that it was listening on that port.
This PR doesn’t modify the E2E test app or fixture, and the new sample tests passed. Could a maintainer rerun the failed job? I don’t appear to have rerun permissions. If it fails again, I’m happy to investigate further.

@WhitWaldo

Copy link
Copy Markdown
Contributor

I checked the failed integration job. Three existing GrpcProxyTests failed: two with connection refused at 127.0.0.1:37959, and the deadline test received Unavailable instead of DeadlineExceeded. The log shows grpcapp reporting that it was listening on that port. This PR doesn’t modify the E2E test app or fixture, and the new sample tests passed. Could a maintainer rerun the failed job? I don’t appear to have rerun permissions. If it fails again, I’m happy to investigate further.

Don't worry about it - those are flaky. I'm slowly phasing them out. I'll get this reviewed and merged in in the next couple of days. Thank you for putting this together.

@WhitWaldo WhitWaldo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great altogether - please tweak the example text to something more generic and I can merge. Thank you for putting this together, especially so quickly!

Comment thread examples/Client/GrpcProxy/README.md Resolved
Signed-off-by: RakeshCodeLab <205911647+RakeshCodeLab@users.noreply.github.com>
WhitWaldo
WhitWaldo previously approved these changes Oct 7, 2026

@WhitWaldo WhitWaldo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect. Thank you! I'll get this merged in after the RC1 is cut.

@WhitWaldo
WhitWaldo merged commit 148c332 into dapr:master Oct 18, 2026
644 of 645 checks passed
@WhitWaldo

Copy link
Copy Markdown
Contributor

Thank you @RakeshCodeLab for taking the time to contribute this example!

@marcduiker

Copy link
Copy Markdown
Contributor

@holopin-bot @RakeshCodeLab sdk-badge Thank you! Here's a digital badge as a small token of appreciation.

@holopin-bot

holopin-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

Congratulations @RakeshCodeLab, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/cmvgexoq10005gz04gtsrnz2t

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants