diff --git a/composer.json b/composer.json index b4e4e56..13f8057 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "utopia-php/dsn": "0.2.*", "utopia-php/http": "2.0.0-rc18@RC", "utopia-php/orchestration": "^0.19.2", - "utopia-php/storage": "^3.1", + "utopia-php/storage": "^4.0", "utopia-php/system": "0.10.*" }, "require-dev": { diff --git a/composer.lock b/composer.lock index ef07e05..838752b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5f3fc9a1f7ad194ab95cc5fc4c8b7239", + "content-hash": "4406170d40da27cf62b09e1728d9a6a9", "packages": [ { "name": "brick/math", @@ -2473,16 +2473,16 @@ }, { "name": "utopia-php/storage", - "version": "3.1.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "38bfc0c14a16a7de2a86b3331865dad1230ed739" + "reference": "ad05f341a9a62a4de73c5312f4ab6fe69f7d0051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/38bfc0c14a16a7de2a86b3331865dad1230ed739", - "reference": "38bfc0c14a16a7de2a86b3331865dad1230ed739", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/ad05f341a9a62a4de73c5312f4ab6fe69f7d0051", + "reference": "ad05f341a9a62a4de73c5312f4ab6fe69f7d0051", "shasum": "" }, "require": { @@ -2517,9 +2517,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/3.1.0" + "source": "https://github.com/utopia-php/storage/tree/4.0.0" }, - "time": "2026-07-22T15:57:57+00:00" + "time": "2026-07-23T20:37:10+00:00" }, { "name": "utopia-php/system", diff --git a/src/Executor/Runner/Docker.php b/src/Executor/Runner/Docker.php index 89fe796..00db638 100644 --- a/src/Executor/Runner/Docker.php +++ b/src/Executor/Runner/Docker.php @@ -297,7 +297,7 @@ public function createRuntime( /** * Copy code files from source to a temporary location on the executor */ - if ($source !== '' && $source !== '0' && !$sourceDevice->transfer($source, $tmpSource, $localDevice)) { + if ($source !== '' && $source !== '0' && !$sourceDevice->copy($source, $tmpSource, $localDevice)) { throw new \Exception('Failed to copy source code to temporary directory'); ; } @@ -448,7 +448,7 @@ public function createRuntime( $destinationDevice = StorageFactory::getDevice($destination, System::getEnv('OPR_EXECUTOR_CONNECTION_STORAGE')); $path = $destinationDevice->getPath(\uniqid() . '.' . \pathinfo($tmpBuild, PATHINFO_EXTENSION)); - if (!$localDevice->transfer($tmpBuild, $path, $destinationDevice)) { + if (!$localDevice->copy($tmpBuild, $path, $destinationDevice)) { throw new \Exception('Failed to move built code to storage'); }; @@ -612,7 +612,7 @@ private function restoreBuildCacheArtifact(string $cacheKey, string $tmpCache, L return; } - if (!$cacheDevice->transfer($artifact, $tmpCache . '/stores.sqfs', $localDevice)) { + if (!$cacheDevice->copy($artifact, $tmpCache . '/stores.sqfs', $localDevice)) { throw new \Exception('Failed to restore build cache artifact'); } } @@ -628,7 +628,7 @@ private function storeBuildCacheArtifact(string $cacheKey, string $tmpCache, Loc $cacheDevice = $this->getBuildCacheDevice(); $destinationArtifact = $this->getBuildCacheArtifactPath($cacheDevice, $cacheKey); - if (!$localDevice->transfer($artifact, $destinationArtifact, $cacheDevice)) { + if (!$localDevice->copy($artifact, $destinationArtifact, $cacheDevice)) { throw new \Exception('Failed to store build cache artifact'); } } @@ -991,10 +991,10 @@ public function createExecution( if ($logDevice->exists($logFile)) { if ($logDevice->getFileSize($logFile) > MAX_LOG_SIZE) { $maxToRead = MAX_LOG_SIZE; - $logs = $logDevice->read($logFile, 0, $maxToRead); + $logs = (string) $logDevice->read($logFile, 0, $maxToRead); $logs .= "\nLog file has been truncated to " . number_format(MAX_LOG_SIZE / 1048576, 2) . "MB."; } else { - $logs = $logDevice->read($logFile); + $logs = (string) $logDevice->read($logFile); } $logDevice->delete($logFile); @@ -1003,10 +1003,10 @@ public function createExecution( if ($logDevice->exists($errorFile)) { if ($logDevice->getFileSize($errorFile) > MAX_LOG_SIZE) { $maxToRead = MAX_LOG_SIZE; - $errors = $logDevice->read($errorFile, 0, $maxToRead); + $errors = (string) $logDevice->read($errorFile, 0, $maxToRead); $errors .= "\nError file has been truncated to " . number_format(MAX_LOG_SIZE / 1048576, 2) . "MB."; } else { - $errors = $logDevice->read($errorFile); + $errors = (string) $logDevice->read($errorFile); } $logDevice->delete($errorFile);