Skip to content
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

support metadata in state bulk get state #114

Merged
merged 4 commits into from
Dec 7, 2020

Conversation

skyao
Copy link
Member

@skyao skyao commented Dec 2, 2020

update GetBulkState method:

  1. add metedata parameter
  2. change return struct to BulkStateItem

The details of this PR is discussed in dapr issue :

dapr/dapr#2368

dapr/dapr#2498

@yaron2
Copy link
Member

yaron2 commented Dec 2, 2020

/cc @mchmarny

@mchmarny mchmarny self-requested a review December 3, 2020 15:12
Copy link
Member

@mchmarny mchmarny left a comment

Choose a reason for hiding this comment

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

@skyao thanks for the PR. You can update the protos in the go SDK by running make protos so you can uncomment the BulkStateItem bits and we land a clean PR. Also, could please expand the existing test to cover the metadata bits your PR adds to state. We have test coverage thresholds in place so adding these new fields to test will ensure the PR passes.

@skyao
Copy link
Member Author

skyao commented Dec 4, 2020

@skyao thanks for the PR. You can update the protos in the go SDK by running make protos so you can uncomment the BulkStateItem bits and we land a clean PR. Also, could please expand the existing test to cover the metadata bits your PR adds to state. We have test coverage thresholds in place so adding these new fields to test will ensure the PR passes.

OK, I will try to update the protos and generated go source code.

But I meet one problem: when I run "make protos" successfully without change the protos, the generated code is big different with curernt files. I think this difference due to the version of the tools.

Since I don't find any review requirements in go-sdk repo, I tried to find in dapr repo and found this:

Because of etcd dependency issue, contributor needs to use the below verisons of tools to generate gRPC protobuf clients.

Should we use the save version in go-sdk?

@skyao
Copy link
Member Author

skyao commented Dec 4, 2020

I update to use above version, the generated code is the same as commited in dapr/dapr repo. But it is big different with the one in go sdk.

And in dapr/proto/runtime/v1/dapr.pb.go of go-sdk, I found following information:

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.25.0
// 	protoc        v3.13.0
// source: dapr/proto/runtime/v1/dapr.proto

Compare to the version requirements in dapr/dapr:

protoc version: v3.11.0
protobuf protoc-gen-go: v1.3.2
gRPC version: v1.26.0

So to generated the code in go-sdk, which version should we use?

@mchmarny
Copy link
Member

mchmarny commented Dec 4, 2020

We should follow the newer one, in dapr/dapr. Let me take a look at the setup in makefile.

@mchmarny
Copy link
Member

mchmarny commented Dec 4, 2020

OK, so ye, we should use the new one. The make protos step in go-sdk makefile just uses whatever version of protoc you have installed locally. I just ran it and got:

// 	protoc-gen-go v1.25.0
// 	protoc        v3.14.0

I know @youngbupark was going to be updating the protoc in dapr/dapr.

Let me update the protos in a separate PR then you can re-base on that.

@mchmarny
Copy link
Member

mchmarny commented Dec 4, 2020

OK, I got #116 in, one this lands you can update the metadata PR.

@mchmarny
Copy link
Member

mchmarny commented Dec 4, 2020

OK, #116 landed, so you just need to resolve these few conflicts and you should be good to go.

@skyao
Copy link
Member Author

skyao commented Dec 6, 2020

@mchmarny Code rebased now.

Copy link
Member

@mchmarny mchmarny left a comment

Choose a reason for hiding this comment

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

Left a couple of comments

@mchmarny mchmarny self-requested a review December 7, 2020 13:33
Copy link
Member

@mchmarny mchmarny left a comment

Choose a reason for hiding this comment

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

/lgtm

@mchmarny mchmarny merged commit 32dbe98 into dapr:main Dec 7, 2020
@skyao skyao deleted the support-metadata-in-state-get branch December 8, 2020 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants