From 5fb41fd2169b2f85fc754cdf7afcfff04eaae205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 3 Jul 2024 08:00:17 +0000 Subject: [PATCH] Fix executions --- app/controllers/api/functions.php | 1 - docker-compose.yml | 2 +- src/Executor/Executor.php | 5 ++++- tests/e2e/General/HTTPTest.php | 1 - 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 4af12fa9e5..f9863c3607 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1704,7 +1704,6 @@ App::post('/v1/functions/:functionId/executions') } $executionId = ID::unique(); - var_dump("creating execution document"); $execution = new Document([ '$id' => $executionId, diff --git a/docker-compose.yml b/docker-compose.yml index ba4277a053..f7834a29ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -823,7 +823,7 @@ services: hostname: exc1 <<: *x-logging stop_signal: SIGINT - image: openruntimes/executor:0.5.5 + image: openruntimes/executor:0.6.0 restart: unless-stopped networks: - appwrite diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 37c2963be9..34cdae38d2 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -191,7 +191,6 @@ class Executor $params = [ 'runtimeId' => $runtimeId, 'variables' => $variables, - 'body' => $body, 'timeout' => $timeout, 'path' => $path, 'method' => $method, @@ -206,6 +205,10 @@ class Executor 'logging' => $logging, ]; + if(!empty($body)) { + $params['body'] = $body; + } + // Safety timeout. Executor has timeout, and open runtime has soft timeout. // This one shouldn't really happen, but prevents from unexpected networking behaviours. if ($requestTimeout == null) { diff --git a/tests/e2e/General/HTTPTest.php b/tests/e2e/General/HTTPTest.php index 67b3add8a6..92bc52561c 100644 --- a/tests/e2e/General/HTTPTest.php +++ b/tests/e2e/General/HTTPTest.php @@ -108,7 +108,6 @@ class HTTPTest extends Scope '0.14.x', ]; - // var_dump($files); foreach ($files as $file) { if (in_array($file, ['.', '..'])) { continue;