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

Use a named event for dapr stop on Windows (#631) #638

Merged
merged 1 commit into from
Mar 22, 2021

Conversation

wcs1only
Copy link
Contributor

@wcs1only wcs1only commented Mar 19, 2021

Description

Windows doesn't have an easy SIGTERM equivalent, so we use a named event to signal Windows to stop Dapr gracefully.

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: #631

Manual Testing

Without this change (run dapr stop --app-id in another terminal):

You're up and running! Both Dapr and your app logs will appear here.


C:\Users\Charlie\quickstarts\hello-world>echo %ERRORLEVEL%
1

With this change (run dapr stop --app-id in another terminal):

You're up and running! Both Dapr and your app logs will appear here.


terminated signal received: shutting down
Exited Dapr successfully
Exited App successfully

C:\Users\Charlie\quickstarts\hello-world>echo %ERRORLEVEL%
0

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

@wcs1only wcs1only force-pushed the gracefull_shutdown_windows branch 6 times, most recently from 52f5ad9 to 626e6fc Compare March 19, 2021 23:54
@codecov
Copy link

codecov bot commented Mar 20, 2021

Codecov Report

Merging #638 (39850df) into master (8e183b2) will increase coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #638      +/-   ##
==========================================
+ Coverage   20.11%   20.17%   +0.05%     
==========================================
  Files          28       28              
  Lines        1372     1368       -4     
==========================================
  Hits          276      276              
+ Misses       1063     1059       -4     
  Partials       33       33              
Impacted Files Coverage Δ
pkg/standalone/stop.go 0.00% <0.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 8e183b2...39850df. Read the comment docs.

cmd/shutdown_windows.go Show resolved Hide resolved
cmd/shutdown_windows.go Show resolved Hide resolved
pkg/standalone/stop_windows.go Show resolved Hide resolved
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.

CLI returns non-zero when dapr stop is used on Windows
2 participants