From 5c2deb9c1b77b08d999685e0602adbf487306e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=A4rlocher?= Date: Tue, 14 Jul 2026 13:12:15 +0200 Subject: [PATCH] feat(plugin): remove the 300-second plugin execution timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docs/extending/plugins.md | 7 +++++-- src/Plugin/PluginProxyCommand.php | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/extending/plugins.md b/docs/extending/plugins.md index 7e3e8810..2def2fd5 100644 --- a/docs/extending/plugins.md +++ b/docs/extending/plugins.md @@ -86,8 +86,11 @@ Built-in `project:*` commands always take precedence. A plugin whose `@command` Plugins run on the **host machine** via `PluginProxyCommand`. The plugin script is executed directly as a process with: -- A 300-second timeout -- TTY support when the terminal supports it (interactive commands work) +- No timeout -- plugins may run arbitrarily long (deploys, imports, shells). + You watch the output and press Ctrl-C to abort if it looks stuck. +- TTY support when the terminal supports it -- the plugin keeps the real + terminal, so colours and interactive prompts (`docker exec -it`, `read`, ...) + work as usual. - Arguments appended to the script invocation - Exit code forwarded to the caller diff --git a/src/Plugin/PluginProxyCommand.php b/src/Plugin/PluginProxyCommand.php index a780e415..28baa076 100644 --- a/src/Plugin/PluginProxyCommand.php +++ b/src/Plugin/PluginProxyCommand.php @@ -64,7 +64,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int /** @var list $command */ $command = array_merge([$this->plugin->scriptPath], is_array($args) ? array_values($args) : []); - $process = $this->processFactory->create($command, null, 300); + // No timeout: plugins may run arbitrarily long (deploys, imports, + // shells). The developer watches the output and aborts with Ctrl-C. + $process = $this->processFactory->create($command, null, null); if (Process::isTtySupported() && $output instanceof ConsoleOutputInterface) { $process->setTty(true);