New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workflow grpc start API: Generate instanceID if not present #7503
Conversation
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #7503 +/- ##
==========================================
- Coverage 62.12% 62.12% -0.01%
==========================================
Files 245 245
Lines 22346 22346
==========================================
- Hits 13883 13882 -1
- Misses 7303 7305 +2
+ Partials 1160 1159 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mark the instanceID as optional in the proto definition. Are other fields optional?
dapr/dapr/proto/runtime/v1/dapr.proto
Line 1046 in 6b7c94f
string instance_id = 1 [json_name = "instanceID"]; |
Do we require optional here? If instanceId is blank, then we just need to assign a random value to it. |
@DeepanshuA Fields which are optional ( |
We don't use optional in Dapr protos AFAIK. I vote for consistency. This change should define optional fields consistently with the other Dapr APIs. If we want to adopt the "optional" feature in proto, we should do it consistently in all the API. |
We do not set optional keyword for any other "optional" fields that we already have in the protos. |
We decided to keep consistency of not using "optional" in the API.
Description
Dapr Grpc API to start workflow errors out if no instanceID is given:
dapr/pkg/api/universal/workflow_test.go
Line 74 in 6b7c94f
However, when using HTTP API, instanceID is generated if empty, as expected. This causes inconsistency between HTTP and Grpc clients. This PR updates Grpc API to have the same behavior as http.
Issue reference
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: