-
Notifications
You must be signed in to change notification settings - Fork 103
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
Rework Windows Services #426
Conversation
Move windows service functionality out of main, and into an svc subcommand. Remove the service management stuff. That’s better handled by the packaging. Replace the auto detection stuff with an explicit `svc` or `svc-debug`. The auto-detect is flakey and we should be explicit.
This will facilitate using a flag parsing lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine to me, I don't have strong opinions on the flag parsing lib, looks like ff
does the 'get default from ENV' behavior that we had.
I really like the tests, looks like they verify that both --flag
and -flag
work as expected?
Perhaps I'm missing it, but are we not keeping the installService
, removeService
etc. sub-commands around? If so, I'm sure there is a good reason - I just can't tell what it is from this PR.
Co-Authored-By: directionless <github@directionless.org>
Co-Authored-By: directionless <github@directionless.org>
Correct -- it removes the service management commands. I think those are better handled by the package tooling. I'm not opposed to bringing them back if we find we need them. Yes, the tests are trying to very both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we support flagfiles for configuration (#426) let's start using them. * moves the launcher options into a flag file * adds things to wix to correctly create services * Fixes some bugs around wix template variables
We have a couple of hard to support windows corner cases. I think these stem from the difference between windows services, and traditional unix daemons. This PR aims to make them more approachable.
Moves the windows startup process to being explicit, instead of autotected on whether it's in windows and non-interactive. Now there are
svc
andsvc-debug
subcommands. This should remove a source of strange errors when interactivity is mis-detected, and also makes it easier to run launcher in various modes for debugging.Remove the service management This removes the service management tools. That's better handled by ther packaging.
Change the flag parsing from
kit/env
toff
. This should allow us to more easily pass in a flag file.Refactor several things in support of these.
I think this is mergeable now.