Skip to content

Add shutdown API support#530

Merged
artursouza merged 3 commits into
dapr:masterfrom
halspang:shutdown_api
Apr 7, 2021
Merged

Add shutdown API support#530
artursouza merged 3 commits into
dapr:masterfrom
halspang:shutdown_api

Conversation

@halspang

Copy link
Copy Markdown
Contributor

Description

Adds support for the shutdown API.

Issue reference

This PR will close: #529

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

@halspang halspang marked this pull request as draft March 31, 2021 01:26
Comment thread sdk-tests/src/test/java/io/dapr/it/DaprRun.java Outdated
Comment thread sdk/src/test/java/io/dapr/client/DaprClientGrpcTest.java
@halspang halspang marked this pull request as ready for review March 31, 2021 19:22
@halspang halspang requested a review from artursouza March 31, 2021 19:22
artursouza
artursouza previously approved these changes Apr 3, 2021
public Mono<Void> shutdown() {
String[] pathSegments = new String[]{ DaprHttp.API_VERSION, "shutdown" };
return Mono.subscriberContext().flatMap(
context -> client.invokeApi(DaprHttp.HttpMethods.GET.name(), pathSegments,

@artursouza artursouza Apr 3, 2021

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.

We will update this to POST. GET will still be supported for backwards compatibility but POST is the recommended way. Charlie has a PR for that in runtime.

@codecov

codecov Bot commented Apr 6, 2021

Copy link
Copy Markdown

Codecov Report

Merging #530 (be1dcb1) into master (bdf8e86) will increase coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #530      +/-   ##
============================================
+ Coverage     80.46%   80.65%   +0.19%     
- Complexity      975      982       +7     
============================================
  Files            88       88              
  Lines          3015     3024       +9     
  Branches        331      331              
============================================
+ Hits           2426     2439      +13     
+ Misses          423      420       -3     
+ Partials        166      165       -1     
Impacted Files Coverage Δ Complexity Δ
...k/src/main/java/io/dapr/client/DaprClientGrpc.java 89.84% <100.00%> (+0.12%) 103.00 <3.00> (+3.00)
...k/src/main/java/io/dapr/client/DaprClientHttp.java 91.89% <100.00%> (+0.11%) 98.00 <2.00> (+2.00)
.../src/main/java/io/dapr/client/DaprClientProxy.java 74.13% <100.00%> (+0.45%) 37.00 <1.00> (+1.00)
sdk/src/main/java/io/dapr/utils/Retry.java 75.00% <0.00%> (+25.00%) 2.00% <0.00%> (+1.00%)

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 bdf8e86...be1dcb1. Read the comment docs.

@halspang halspang requested a review from artursouza April 7, 2021 16:51
@artursouza artursouza merged commit a654861 into dapr:master Apr 7, 2021
fackee pushed a commit to fackee/java-sdk that referenced this pull request Mar 28, 2022
* Add shutdown API support

dapr#529

* Utilize POST instead of GET for shutdown API

Signed-off-by: zjx244729 <zjx244729@alibaba-inc.com>
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.

Add Shutdown API

2 participants