js-sdk icon indicating copy to clipboard operation
js-sdk copied to clipboard

feat(bindings): Pass Metadata in grpc binding invocation

Open DeepanshuA opened this issue 2 years ago • 4 comments

Signed-off-by: Deepanshu Agarwal [email protected]

Description

Adds metadata capability to output binding invocation.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #339

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • [x] Code compiles correctly
  • [x] Created/updated tests
  • [ ] Extended the documentation

DeepanshuA avatar Sep 01 '22 17:09 DeepanshuA

Codecov Report

Merging #348 (f388731) into main (4c56ed0) will decrease coverage by 12.99%. The diff coverage is 25.00%.

@@             Coverage Diff             @@
##             main     #348       +/-   ##
===========================================
- Coverage   38.21%   25.21%   -13.00%     
===========================================
  Files          78       78               
  Lines        6398     6400        +2     
  Branches      279      279               
===========================================
- Hits         2445     1614      -831     
- Misses       3913     4782      +869     
+ Partials       40        4       -36     
Impacted Files Coverage Δ
src/implementation/Client/GRPCClient/binding.ts 23.52% <25.00%> (-63.14%) :arrow_down:
src/implementation/Server/GRPCServer/pubsub.ts 9.52% <0.00%> (-80.96%) :arrow_down:
...implementation/Server/GRPCServer/GRPCServerImpl.ts 3.61% <0.00%> (-73.50%) :arrow_down:
src/implementation/Client/GRPCClient/invoker.ts 20.58% <0.00%> (-67.65%) :arrow_down:
src/implementation/Server/GRPCServer/binding.ts 33.33% <0.00%> (-66.67%) :arrow_down:
src/implementation/Server/GRPCServer/GRPCServer.ts 12.50% <0.00%> (-62.50%) :arrow_down:
src/implementation/Client/GRPCClient/pubsub.ts 25.00% <0.00%> (-55.00%) :arrow_down:
src/implementation/Client/GRPCClient/GRPCClient.ts 20.00% <0.00%> (-51.12%) :arrow_down:
src/implementation/Server/DaprServer.ts 30.00% <0.00%> (-46.00%) :arrow_down:
... and 40 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Sep 01 '22 17:09 codecov[bot]

E2E test is failing here, since we are using Dapr 1.8.0, the latest released major version (https://github.com/dapr/js-sdk/blob/c3f6347f632a508944f7b8296298f665f32a9d6f/.github/workflows/test-e2e.yml#L39) But, it needs change from https://github.com/dapr/dapr/pull/5049, specifically https://github.com/dapr/dapr/blob/490ef74dbd06e13a4557a249afd58d1abecb01af/pkg/grpc/api.go#L547

DeepanshuA avatar Sep 01 '22 19:09 DeepanshuA

Commented out E2E test for now - E2E tests should pass now. Would un-comment after dapr 1.9 release.

DeepanshuA avatar Sep 01 '22 19:09 DeepanshuA

E2E test is failing here, since we are using Dapr 1.8.0, the latest released major version (

https://github.com/dapr/js-sdk/blob/c3f6347f632a508944f7b8296298f665f32a9d6f/.github/workflows/test-e2e.yml#L39

) But, it needs change from dapr/dapr#5049, specifically https://github.com/dapr/dapr/blob/490ef74dbd06e13a4557a249afd58d1abecb01af/pkg/grpc/api.go#L547

@DeepanshuA is it possible to use some other metadata for testing? i.e. if you consider MQTT, we can override the topic via metadata (docs) and test it.

shubham1172 avatar Sep 02 '22 05:09 shubham1172

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot avatar Oct 20 '22 15:10 dapr-bot

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

dapr-bot avatar Oct 27 '22 15:10 dapr-bot