1
0
Fork 0
mirror of synced 2024-05-17 11:12:41 +12:00

Merge pull request #4611 from appwrite/fix-missing-deployment-attributes

Fix get deployment
This commit is contained in:
Christy Jacob 2022-11-02 08:05:10 +05:30 committed by GitHub
commit be642762b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

@ -2,6 +2,7 @@
## Bugs
- Fix license detection for Flutter and Dart SDKs [#4435](https://github.com/appwrite/appwrite/pull/4435)
- Fix missing status, buildStderr and buildStderr from get deployment response [#4611](https://github.com/appwrite/appwrite/pull/4611)
# Version 1.0.4

View file

@ -874,6 +874,11 @@ App::get('/v1/functions/:functionId/deployments/:deploymentId')
throw new Exception(Exception::DEPLOYMENT_NOT_FOUND);
}
$build = $dbForProject->getDocument('builds', $deployment->getAttribute('buildId', ''));
$deployment->setAttribute('status', $build->getAttribute('status', 'processing'));
$deployment->setAttribute('buildStderr', $build->getAttribute('stderr', ''));
$deployment->setAttribute('buildStdout', $build->getAttribute('stdout', ''));
$response->dynamic($deployment, Response::MODEL_DEPLOYMENT);
});

View file

@ -570,6 +570,9 @@ class FunctionsCustomServerTest extends Scope
$this->assertEquals(200, $function['headers']['status-code']);
$this->assertEquals(0, $function['body']['buildTime']);
$this->assertNotEmpty($function['body']['status']);
$this->assertNotEmpty($function['body']['buildStdout']);
$this->assertArrayHasKey('buildStderr', $function['body']);
/**
* Test for FAILURE