Skip to content

Rename methods and parameters for consistency across SDKs#410

Merged
artursouza merged 1 commit into
dapr:masterfrom
arghya88:rename-methods
Dec 16, 2020
Merged

Rename methods and parameters for consistency across SDKs#410
artursouza merged 1 commit into
dapr:masterfrom
arghya88:rename-methods

Conversation

@arghya88

Copy link
Copy Markdown
Contributor

Signed-off-by: Arghya Sadhu arghya88@gmail.com

Description

Rename methods and parameters for consistency across SDKs

Issue reference

Fixes #409

Checklist

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

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

@ghost

ghost commented Dec 10, 2020

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@arghya88 arghya88 force-pushed the rename-methods branch 2 times, most recently from 0f3094b to ee9576a Compare December 10, 2020 10:51

@mukundansundar mukundansundar 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.

@arghya88 Thanks for your contribution. I have left some comments in the PR.

Comment thread sdk-actors/src/main/java/io/dapr/actors/runtime/DaprClient.java
Comment thread sdk/src/main/java/io/dapr/client/AbstractDaprClient.java Outdated
Comment thread sdk/src/main/java/io/dapr/client/AbstractDaprClient.java Outdated
Comment thread sdk/src/main/java/io/dapr/client/DaprClient.java Outdated
Comment thread sdk/src/main/java/io/dapr/client/DaprClient.java Outdated
Comment thread sdk/src/main/java/io/dapr/client/DaprClient.java Outdated
Comment thread sdk/src/main/java/io/dapr/client/DaprClient.java Outdated
Comment thread sdk/src/main/java/io/dapr/client/DaprClient.java Outdated
Comment thread sdk/src/main/java/io/dapr/client/DaprClient.java Outdated
@artursouza

Copy link
Copy Markdown
Contributor

@arghya88 Thanks a lot for your contribution. The issue was not clear on every detail on the renaming, please see comments on the PR. We appreciate your help here.

@arghya88 arghya88 force-pushed the rename-methods branch 3 times, most recently from f85bc97 to 607be1b Compare December 11, 2020 07:05
@arghya88

Copy link
Copy Markdown
Contributor Author

@artursouza @mukundansundar thanks for the feedback. Have incorporated the changes.PTAL.

@mukundansundar

Copy link
Copy Markdown
Contributor

@arghya88 Please remove all html changes. The docs will be updated during the release of the sdk.

@mukundansundar mukundansundar 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.

Rename GetStatesRequestBuilder also to GetBulkStateRequestBuilder
@arghya88 left a few more comments.

Comment thread sdk/src/main/java/io/dapr/client/DaprClient.java Outdated
Comment thread sdk/src/test/java/io/dapr/client/DaprClientGrpcTest.java Outdated
@arghya88 arghya88 force-pushed the rename-methods branch 3 times, most recently from c4181f5 to 2a4bfec Compare December 11, 2020 08:30
@arghya88

Copy link
Copy Markdown
Contributor Author

Rename GetStatesRequestBuilder also to GetBulkStateRequestBuilder
@arghya88 left a few more comments.

@mukundansundar Done

@mukundansundar mukundansundar 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.

@arghya88 Just a few more changes. Please resolve conflicts.
Rename stateStoreName to storeName in GetStateRequest, GetStateRequestBuilder, SaveStateRequest, SaveStateRequestBuilder, GetBulkState and GetBulkStateRequestBuilder.
Also change secretStoreName to storeName in GetSecretRequest and GetSecretRequestBuilder`

@artursouza any thoughts on these changes?

Comment thread sdk/src/main/java/io/dapr/client/domain/GetBulkStateRequestBuilder.java Outdated
Comment thread sdk/src/main/java/io/dapr/client/domain/GetBulkStateRequest.java Outdated
Comment thread sdk/src/main/java/io/dapr/client/DaprClient.java Outdated
InvokeServiceRequestBuilder builder = new InvokeServiceRequestBuilder(appId, methodName);
InvokeServiceRequest req = builder
.withBody(request)
.withBody(data)

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.

@artursouza Should body be renamed to data?
Also should InvokeServiceRequest and associated builder be renamed to InvokeMethodRequest since the API methods are being renamed?

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.

@artursouza On second thought why is invokeService being renamed to invokeMethod? I think invokeService makes sense since we are invoking a particular method in that service.

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.

Let's discuss this with the maintainers and see if we can change it. Let's not merge this PR for this milestone, so we have time to change it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would say let's do this in a followup PR after discussing with maintainers.

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.

Well, we have cut the milestone already, so we can merge this PR soon and still have another PR to rename to invokeService again if maintainers agree to name it back.

@artursouza

Copy link
Copy Markdown
Contributor

@arghya88 Please, address comments from @mukundansundar. Your PR is appreciated.

Comment thread examples/src/main/java/io/dapr/examples/state/StateClient.java
@arghya88 arghya88 force-pushed the rename-methods branch 3 times, most recently from 14780a0 to ab917c8 Compare December 15, 2020 06:23
Comment thread examples/src/main/java/io/dapr/examples/state/README.md Outdated

@artursouza artursouza 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.

Almost there.

@arghya88

Copy link
Copy Markdown
Contributor Author

Almost there.

@artursouza let me know if anything else is needed.

Signed-off-by: Arghya Sadhu <arghya88@gmail.com>
@codecov

codecov Bot commented Dec 16, 2020

Copy link
Copy Markdown

Codecov Report

Merging #410 (d15893b) into master (de4c37e) will increase coverage by 0.00%.
The diff coverage is 92.03%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #410   +/-   ##
=========================================
  Coverage     83.26%   83.27%           
  Complexity      835      835           
=========================================
  Files            72       72           
  Lines          2486     2487    +1     
  Branches        255      255           
=========================================
+ Hits           2070     2071    +1     
  Misses          293      293           
  Partials        123      123           
Impacted Files Coverage Δ Complexity Δ
...ain/java/io/dapr/actors/client/DaprGrpcClient.java 87.50% <ø> (ø) 6.00 <0.00> (ø)
...ain/java/io/dapr/actors/client/DaprHttpClient.java 100.00% <ø> (ø) 3.00 <0.00> (ø)
...in/java/io/dapr/actors/runtime/DaprGrpcClient.java 95.50% <ø> (ø) 20.00 <0.00> (ø)
...in/java/io/dapr/actors/runtime/DaprHttpClient.java 80.70% <ø> (ø) 13.00 <0.00> (ø)
...dapr/client/domain/GetBulkStateRequestBuilder.java 84.21% <84.21%> (ø) 3.00 <3.00> (?)
...c/main/java/io/dapr/client/AbstractDaprClient.java 89.85% <84.61%> (+0.14%) 33.00 <28.00> (ø)
...ain/java/io/dapr/actors/client/ActorProxyImpl.java 90.24% <100.00%> (ø) 24.00 <6.00> (ø)
...ain/java/io/dapr/actors/runtime/AbstractActor.java 85.33% <100.00%> (ø) 27.00 <2.00> (ø)
...io/dapr/actors/runtime/DaprStateAsyncProvider.java 60.86% <100.00%> (ø) 14.00 <2.00> (ø)
...k/src/main/java/io/dapr/client/DaprClientGrpc.java 85.61% <100.00%> (ø) 84.00 <23.00> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de4c37e...0b649fa. Read the comment docs.

@artursouza artursouza merged commit 11d9e3b into dapr:master Dec 16, 2020
@arghya88 arghya88 deleted the rename-methods branch December 23, 2020 12:25
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.

Rename methods and parameters for consistency across SDKs

3 participants