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

Handle operating system shutdown by overriding OnShutdown() #2705

Merged
merged 3 commits into from
Nov 26, 2019

Conversation

peval27
Copy link

@peval27 peval27 commented Nov 22, 2019

Summary of the changes

  • overridden ServiceBase.OnShutdown() to get notified on OS shutdown

Addresses #2699

@analogrelay
Copy link

I was about to ask "can you add a test" but then I realized that would be very tricky ;).

@peval27
Copy link
Author

peval27 commented Nov 23, 2019

Yeah I don't see too much existing unit testing here

@peval27
Copy link
Author

peval27 commented Nov 23, 2019

BTW I saw you added milestone 5.0.0. what's the ETA? The released one is 3, so I assume quite a long time here. Wouldn't be possible to squash his big fix in a maintenance 3.0.x

@analogrelay
Copy link

Yeah I don't see too much existing unit testing here

Well, and testing something that requires shutting down the machine doesn't really lend itself to an automated test ;).

The full roadmap can be found here: https://github.com/dotnet/core/blob/master/roadmap.md

BTW I saw you added milestone 5.0.0. what's the ETA? The released one is 3, so I assume quite a long time here. Wouldn't be possible to squash his big fix in a maintenance 3.0.x

5.0 is the next release after 3.1 (which is locked down for release in December), we're skipping 4.x to avoid conflicts with .NET Framework. The ETA is November 2020.

We don't generally add functionality in a maintenance release. We never provided support for the OnShutdown event in the past so this isn't really a regression. Can you provide any details on what scenarios are blocked in your environment? Given that this can be worked around by registering your own version of WindowsServiceLifetime in the container (based on this fixed code), I think this wouldn't meet the servicing bar.

@dnfclas
Copy link

dnfclas commented Nov 25, 2019

CLA assistant check
All CLA requirements met.

@Tratcher Tratcher self-assigned this Nov 25, 2019
@Tratcher Tratcher merged commit 20254db into dotnet:master Nov 26, 2019
@Tratcher
Copy link
Member

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants