diff --git a/app/config/runtimes.php b/app/config/runtimes.php index 294c346e29..9002016aa0 100644 --- a/app/config/runtimes.php +++ b/app/config/runtimes.php @@ -6,7 +6,7 @@ use Appwrite\Runtimes\Runtimes; /** * List of Appwrite Cloud Functions supported runtimes */ -$runtimes = new Runtimes(); +$runtimes = new Runtimes('v1'); $allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES')); diff --git a/app/config/variables.php b/app/config/variables.php index 5449c9ba93..49f2d7cfee 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -1,7 +1,6 @@ 'General', diff --git a/app/executor.php b/app/executor.php index f37a7c4fbd..2e957c624c 100644 --- a/app/executor.php +++ b/app/executor.php @@ -580,11 +580,11 @@ App::init(function ($request, $response) { $http->on('start', function ($http) { global $orchestrationPool; global $activeRuntimes; - + /** * Warmup: make sure images are ready to run fast 🚀 */ - $runtimes = new Runtimes(); + $runtimes = new Runtimes('v1'); $allowList = empty(App::getEnv('_APP_FUNCTIONS_RUNTIMES')) ? [] : \explode(',', App::getEnv('_APP_FUNCTIONS_RUNTIMES')); $runtimes = $runtimes->getAll(true, $allowList); foreach ($runtimes as $runtime) { diff --git a/app/tasks/maintenance.php b/app/tasks/maintenance.php index 6ba744fde0..6bc06584e6 100644 --- a/app/tasks/maintenance.php +++ b/app/tasks/maintenance.php @@ -28,7 +28,7 @@ function getConsoleDB(): Database $database->setDefaultDatabase(App::getEnv('_APP_DB_SCHEMA', 'appwrite')); $database->setNamespace('_console'); // Main DB - if (!$database->exists($database->getDefaultDatabase(), '_metadata')) { + if (!$database->exists($database->getDefaultDatabase(), 'certificates')) { throw new \Exception('Console project not ready'); } diff --git a/composer.json b/composer.json index 410f3f2024..4f3c263729 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "ext-zlib": "*", "ext-sockets": "*", "appwrite/php-clamav": "1.1.*", - "appwrite/php-runtimes": "0.7.*", + "appwrite/php-runtimes": "0.9.*", "utopia-php/framework": "0.19.*", "utopia-php/logger": "0.3.*", "utopia-php/abuse": "0.7.*", diff --git a/composer.lock b/composer.lock index eda3591b23..40f7eff475 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": "ffb0a355553045db9c4f517eec033a90", + "content-hash": "cb8163f39b3bac09c2c547d9afb1064b", "packages": [ { "name": "adhocore/jwt", @@ -115,11 +115,11 @@ }, { "name": "appwrite/php-runtimes", - "version": "0.7.4", + "version": "0.9.0", "source": { "type": "git", "url": "https://github.com/appwrite/runtimes.git", - "reference": "8e0972ecce6ad96f3701edab8d2c9a8af7074093" + "reference": "e8aa94aa42f45711e11cb1da401b442ecc2c32a4" }, "require": { "php": ">=8.0", @@ -154,7 +154,7 @@ "php", "runtimes" ], - "time": "2022-02-26T11:38:09+00:00" + "time": "2022-05-16T10:54:14+00:00" }, { "name": "chillerlan/php-qrcode", diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 6ca06fa120..307a634393 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -764,11 +764,12 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals($executions['body']['executions'][0]['status'], 'failed'); $this->assertEquals($executions['body']['executions'][0]['statusCode'], 500); $this->assertGreaterThan(2, $executions['body']['executions'][0]['time']); - $this->assertLessThan(6, $executions['body']['executions'][0]['time']); + $this->assertLessThan(7, $executions['body']['executions'][0]['time']); + $this->assertGreaterThan(5, $executions['body']['executions'][0]['time']); $this->assertEquals($executions['body']['executions'][0]['response'], ''); $this->assertEquals($executions['body']['executions'][0]['stderr'], 'An internal curl error has occurred within the executor! Error Msg: Operation timed out'); - // Cleanup : Delete function + // Cleanup : Delete function $response = $this->client->call(Client::METHOD_DELETE, '/functions/' . $functionId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'],