Differentiate executor timeouts for builds, sync, and async executions

Adds Executor\Exception\Timeout (with timeoutSeconds) and translates it at
each call site into BUILD_TIMEOUT, FUNCTION_SYNCHRONOUS_TIMEOUT, or
FUNCTION_ASYNCHRONOUS_TIMEOUT instead of always using the misleading sync
function error. Build timeouts now append to streamed buildLogs rather
than replacing them, and the build worker reports its timeout via Span.
This commit is contained in:
loks0n
2026-05-06 15:54:11 +01:00
parent bf52b1ba31
commit 8201fea9ef
9 changed files with 136 additions and 73 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace Executor\Exception;
use Executor\Exception;
use Throwable;
class Timeout extends Exception
{
public function __construct(
string $message,
private readonly int $timeoutSeconds,
int $code = 0,
?Throwable $previous = null,
) {
parent::__construct($message, $code, $previous);
}
public function getTimeoutSeconds(): int
{
return $this->timeoutSeconds;
}
}