Skip to content

feat(plugin): remove plugin execution timeout, forward Ctrl-C to the plugin#239

Open
sbaerlocher wants to merge 1 commit into
v2from
feat/plugin-timeout
Open

feat(plugin): remove plugin execution timeout, forward Ctrl-C to the plugin#239
sbaerlocher wants to merge 1 commit into
v2from
feat/plugin-timeout

Conversation

@sbaerlocher

@sbaerlocher sbaerlocher commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Why

Plugin scripts ran with a hardcoded 300-second timeout that silently killed legitimately long-running plugins (deploys, imports, interactive shells).

A configurable @timeout and a live "still running" status line were both tried and dropped:

  • the timeout is a knob nobody wants to tune;
  • any in-band status line fights the plugin for the terminal — setTty hands 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

  • No timeout — plugins run unbounded, keeping their own TTY (colours, docker exec -it, read, … work as usual).
  • Ctrl-C forwarded via SignalableCommandInterfaceProcess::stop(), so the unbounded child is not orphaned when dde is interrupted.
  • Piped / captured: output forwarded verbatim — scripted and CI usage stay clean.
  • No status line, no ANSI, nothing that depends on terminal quirks. The developer keeps the plugin's output in front of them and aborts if it looks stuck.

Tests / docs

  • Unit: non-TTY forwards output cleanly (no control chars); subscribed signals; handleSignal stops the running plugin (orphan guard).
  • Docs: docs/extending/plugins.md Execution section.
  • Local QA green (1286 tests, PHPStan L8, ECS, Rector) in php:8.5-cli container.

@sbaerlocher sbaerlocher requested a review from xarem July 14, 2026 11:14
@sbaerlocher sbaerlocher force-pushed the feat/plugin-timeout branch from 0fda3a8 to 4180705 Compare July 14, 2026 11:52
@sbaerlocher sbaerlocher changed the title feat(plugin): make plugin execution timeout configurable via @timeout feat(plugin): drop plugin timeout, show a running status line instead Jul 14, 2026
@sbaerlocher sbaerlocher force-pushed the feat/plugin-timeout branch 4 times, most recently from bfabb6b to 8e84e4f Compare July 14, 2026 12:47
@sbaerlocher sbaerlocher changed the title feat(plugin): drop plugin timeout, show a running status line instead feat(plugin): remove plugin execution timeout, forward Ctrl-C to the plugin Jul 14, 2026
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>
@sbaerlocher sbaerlocher force-pushed the feat/plugin-timeout branch from 8e84e4f to 5c2deb9 Compare July 14, 2026 13:18
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.

1 participant