From 53d367c9b632f1e4d9e656ff3ff0ccb2e53f7544 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:56:56 +0530 Subject: [PATCH] Remove unique identifiers from runtime error title --- app/http.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/http.php b/app/http.php index 4793c46e..aa9e5e07 100644 --- a/app/http.php +++ b/app/http.php @@ -299,7 +299,8 @@ function removeAllRuntimes(Table $activeRuntimes, Orchestration $orchestration): ->param('runtimeId', '', new Text(64), 'Runtime unique ID.') ->param('timeout', '600', new Text(16), 'Maximum logs timeout.', true) ->inject('swooleResponse') - ->action(function (string $runtimeId, string $timeoutStr, SwooleResponse $swooleResponse) { + ->inject('log') + ->action(function (string $runtimeId, string $timeoutStr, SwooleResponse $swooleResponse, Log $log) { $timeout = \intval($timeoutStr); $runtimeId = System::getHostname() . '-' . $runtimeId; // Used in Docker (name) @@ -316,7 +317,14 @@ function removeAllRuntimes(Table $activeRuntimes, Orchestration $orchestration): } if ($i === 9) { - throw new Exception('Runtime not ready. Error Msg: ' . $output, 500); + $runtimeIdTokens = explode("-", $runtimeId); + $executorId = $runtimeIdTokens[0]; + $functionId = $runtimeIdTokens[1]; + $deploymentId = $runtimeIdTokens[2]; + $log->addTag('executorId', $executorId); + $log->addTag('functionId', $functionId); + $log->addTag('deploymentId', $deploymentId); + throw new Exception('Runtime not ready. Container not found.', 500); } \usleep(500000);