diff --git a/app/executor.php b/app/executor.php index fe93f37876..d9be75dca7 100644 --- a/app/executor.php +++ b/app/executor.php @@ -395,17 +395,13 @@ App::delete('/v1/runtimes/:runtimeId') App::post('/v1/execution') ->desc('Create an execution') ->param('runtimeId', '', new Text(64), 'The runtimeID to execute') - ->param('path', '', new Text(0), 'Path containing the built files.', false) ->param('vars', [], new Assoc(), 'Environment variables required for the build', false) ->param('data', '', new Text(8192), 'Data to be forwarded to the function, this is user specified.', true) - ->param('runtime', '', new Text(128), 'Runtime for the cloud function', false) - ->param('entrypoint', '', new Text(256), 'Entrypoint of the code file') ->param('timeout', 15, new ValidatorRange(1, 900), 'Function maximum execution time in seconds.', true) - ->param('baseImage', '', new Text(128), 'Base image name of the runtime', false) ->inject('activeRuntimes') ->inject('response') ->action( - function (string $runtimeId, string $path, array $vars, string $data, string $runtime, string $entrypoint, $timeout, string $baseImage, $activeRuntimes, Response $response) { + function (string $runtimeId, array $vars, string $data, $timeout, $activeRuntimes, Response $response) { if (!$activeRuntimes->exists($runtimeId)) { throw new Exception('Runtime not found. Please create the runtime.', 404); diff --git a/app/workers/builds.php b/app/workers/builds.php index a213cfdec4..6e3b56880e 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -114,7 +114,6 @@ class BuildsV1 extends Worker try { $response = $this->executor->createRuntime( projectId: $projectId, - functionId: $functionId, deploymentId: $deploymentId, entrypoint: $deployment->getAttribute('entrypoint'), source: $source, diff --git a/app/workers/deletes.php b/app/workers/deletes.php index d403c1093a..de5ce5aebd 100644 --- a/app/workers/deletes.php +++ b/app/workers/deletes.php @@ -371,7 +371,7 @@ class DeletesV1 extends Worker $executor = new Executor(); foreach ($deploymentIds as $deploymentId) { try { - $executor->deleteRuntime($projectId, $functionId, $deploymentId); + $executor->deleteRuntime($projectId, $deploymentId); } catch (Throwable $th) { Console::error($th->getMessage()); } @@ -421,7 +421,7 @@ class DeletesV1 extends Worker Console::info("Requesting executor to delete deployment container for deployment " . $deploymentId); try { $executor = new Executor(); - $executor->deleteRuntime($projectId, $functionId, $deploymentId); + $executor->deleteRuntime($projectId, $deploymentId); } catch (Throwable $th) { Console::error($th->getMessage()); } diff --git a/app/workers/functions.php b/app/workers/functions.php index c98dae63f0..d98160f151 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -290,7 +290,6 @@ class FunctionsV1 extends Worker try { $executionResponse = $this->executor->createExecution( projectId: $projectId, - functionId: $functionId, deploymentId: $deploymentId, path: $build->getAttribute('outputPath', ''), vars: $vars, diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 4b3953a357..841e1ab64a 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -32,7 +32,6 @@ class Executor } public function createRuntime( - string $functionId, string $deploymentId, string $projectId, string $source, @@ -75,7 +74,7 @@ class Executor return $response['body']; } - public function deleteRuntime(string $projectId, string $functionId, string $deploymentId) + public function deleteRuntime(string $projectId, string $deploymentId) { $runtimeId = "$projectId-$deploymentId"; $route = "/runtimes/$runtimeId"; @@ -98,7 +97,6 @@ class Executor public function createExecution( string $projectId, - string $functionId, string $deploymentId, string $path, array $vars, @@ -116,13 +114,9 @@ class Executor ]; $params = [ 'runtimeId' => "$projectId-$deploymentId", - 'path' => $path, 'vars' => $vars, 'data' => $data, - 'runtime' => $runtime, - 'entrypoint' => $entrypoint, 'timeout' => $timeout, - 'baseImage' => $baseImage, ]; $response = $this->call(self::METHOD_POST, $route, $headers, $params, true, 30); @@ -133,7 +127,6 @@ class Executor switch ($status) { case 404: $response = $this->createRuntime( - functionId: $functionId, deploymentId: $deploymentId, projectId: $projectId, source: $path,