From d6fc03ca63b2d7dfe3caa78fc3a20a519c230075 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Mon, 22 Mar 2021 08:44:13 -0400 Subject: [PATCH 1/3] Throw error only on nonzero exit code --- app/workers/certificates.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/certificates.php b/app/workers/certificates.php index e8693e3566..90907204a3 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -124,7 +124,7 @@ class CertificatesV1 ." -w ".APP_STORAGE_CERTIFICATES ." -d {$domain->get()}", '', $stdout, $stderr); - if($stderr || $exit !== 0) { + if($exit !== 0) { throw new Exception('Failed to issue a certificate with message: '.$stderr); } From a76016fa375fc773295c18c9d5920c23deb33a19 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 22 Mar 2021 18:19:05 +0200 Subject: [PATCH 2/3] Fixed functions tests --- app/controllers/api/functions.php | 2 +- tests/e2e/Services/Functions/FunctionsCustomServerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 7a6b11bcda..92708527a3 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -435,7 +435,7 @@ App::post('/v1/functions/:functionId/tags') ->label('sdk.response.model', Response::MODEL_TAG) ->param('functionId', '', new UID(), 'Function unique ID.') ->param('command', '', new Text('1028'), 'Code execution command.') - ->param('code', null, new File(), 'Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.', false) + ->param('code', [], new File(), 'Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.', false) ->inject('request') ->inject('response') ->inject('projectDB') diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 9dded8fdd7..b04a635cf0 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -628,7 +628,7 @@ class FunctionsCustomServerTest extends Scope ], $this->getHeaders()), [ 'tag' => $tagId, ]); - + $this->assertEquals(200, $tag['headers']['status-code']); $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([ From 7eb45d30f4cd5a8717f85e0364c59f91799484e3 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 22 Mar 2021 22:07:59 +0200 Subject: [PATCH 3/3] Updated change log --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index cc086bb103..184cd763f9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,12 @@ - Upgraded ClamAV to version 1.3.0 +# Version 0.7.2 (Not Released Yet) + +## Bugs + +- Fixed certificates worker error on successful operations + # Version 0.7.1 ## Features