feat(plugin): remove plugin execution timeout, forward Ctrl-C to the plugin#239
Open
sbaerlocher wants to merge 1 commit into
Open
feat(plugin): remove plugin execution timeout, forward Ctrl-C to the plugin#239sbaerlocher wants to merge 1 commit into
sbaerlocher wants to merge 1 commit into
Conversation
0fda3a8 to
4180705
Compare
bfabb6b to
8e84e4f
Compare
Plugin scripts were killed after a hardcoded 300-second process timeout, which cut off legitimately long-running plugins (deploys, imports, interactive shells). Plugins now run with no timeout; the developer watches the output and aborts with Ctrl-C if a plugin looks stuck. With setTty the plugin shares the terminal's process group, so Ctrl-C reaches it directly. A configurable @timeout and a live "still running" status line were both prototyped and dropped: the timeout is a knob nobody wants to tune, and any status line fights the plugin for the terminal (setTty hands it the TTY) and renders differently across shells. The whole change is one argument: pass null instead of 300. Signed-off-by: Simon Bärlocher <s.baerlocher@sbaerlocher.ch>
8e84e4f to
5c2deb9
Compare
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.
Why
Plugin scripts ran with a hardcoded 300-second timeout that silently killed legitimately long-running plugins (deploys, imports, interactive shells).
A configurable
@timeoutand a live "still running" status line were both tried and dropped:setTtyhands the TTY to the plugin, so dde cannot redraw around its output — and breaks differently across shells / emulators (kept clobbering interactive prompts and leaving cursor artefacts).What
docker exec -it,read, … work as usual).SignalableCommandInterface→Process::stop(), so the unbounded child is not orphaned when dde is interrupted.Tests / docs
handleSignalstops the running plugin (orphan guard).docs/extending/plugins.mdExecution section.