Wait for a service while it makes progress, and for one already on its way - #34
Merged
Merged
Conversation
…s way The step limit (--timeout, and "Wait up to" on the plan sheet) now counts time without progress - the check point rising or the state changing - rather than time since the step began. A restart of a service that took longer than the limit to stop used to give up on the stop, ask a service still stopping to start, be refused, and leave it stopped. Before a stop or a start is asked for, an entry already on its way is waited for: a stop to an entry already stopping sends nothing and waits, a start to one still stopping waits for it to stop and then asks. An entry that never leaves the opposite pending state is never asked, and the step fails in its own words with nothing sent. Ending a process is left out of this, because it exists for the entry stuck stopping. A start after which the service falls back to Stopped fails at once, with the service's exit code as errorCode and its service-specific code in the error text only, instead of timing out after the whole limit. ServiceProgress carries dwWin32ExitCode and dwServiceSpecificExitCode. The second Ctrl+C now ends the watching of a step in flight (reported as timed out), and an interruption skips a forward step that has not been asked yet. Steps that put things back keep waiting. Plans starting a disabled or a paused entry warn that Windows will refuse the start (disabledCannotStart, pausedCannotStart). The note about the manager outrunning --timeout is read off the time of its answer alone. The window no longer names a number of seconds in the reason for offering Force stop, and the waiting line says the limit is about progress. The warning describers moved into PlanText.Warnings.cs and PlanWords.Warnings.cs, where the size ratchet pointed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Package C of the stability review: waiting that does not abandon a service half way.
What changes for a person
--timeoutand "Wait up to" on the plan sheet now give up on a step once the limit has passed since the service last reported progress, not since the step began. A restart of a service that takes longer than the limit to stop ends with the service running instead of stopped.errorCodeand its own code (for 1066) in theerrortext, instead of timing out after the whole limit.disabledCannotStart) and starting a paused one (pausedCannotStart).--timeoutto answer is read off the time of the answer alone.Contract
--timeout(README, site anddocsmirrors updated).errorCodeon a failed start carries the service's exit code. No new fields. An abandoned step reportstimedOut.Checked
sc queryon 800 of 800 entries, andbws starton a disabled service shows the new warning. A restart of Spooler ran through the new path with both steps succeeding.Not checked
🤖 Generated with Claude Code