From da9f0bca38c2fe490ef8bd5a1efbb60477840fa7 Mon Sep 17 00:00:00 2001 From: Manuel VACELET Date: Thu, 20 Aug 2026 16:21:13 +0200 Subject: [PATCH] fix: surface full backtrace on tuleap CLI failures The Application override removed the -v/--verbose flag, so Symfony never reached the verbosity needed to print an exception trace. CLI/cron failures (e.g. daily-job) only logged a boxed one-liner with no way to locate the source. Force verbose rendering so every failure surfaces a full backtrace. request #47805 tuleap-launch-daily-event.service should have a stack trace Assisted-by: Claude:claude-opus-4-8 - No Human Review Change-Id: I3adb870bb1a81424f5e42fa186b7d2703b440d7e --- src/common/CLI/Application.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/common/CLI/Application.php b/src/common/CLI/Application.php index 74c47fcb451..b211d0e4ae2 100644 --- a/src/common/CLI/Application.php +++ b/src/common/CLI/Application.php @@ -41,6 +41,20 @@ class Application extends \Symfony\Component\Console\Application ); } + #[\Override] + public function renderThrowable(\Throwable $e, OutputInterface $output): void + { + // The default input definition removes the -v/--verbose flag (see + // getDefaultInputDefinition), so Symfony would otherwise never reach the + // verbosity level required to print an exception trace. Force it here so + // every CLI failure (e.g. the daily-job cron) surfaces a full backtrace. + if ($output->getVerbosity() < OutputInterface::VERBOSITY_VERBOSE) { + $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); + } + + parent::renderThrowable($e, $output); + } + #[\Override] public function doRun(InputInterface $input, OutputInterface $output): int { -- 2.55.0