Merge branch '1.4.x' into feat-support-selfdb

This commit is contained in:
Christy Jacob 2023-10-27 00:19:02 +04:00 committed by GitHub
commit d16e3f2f56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 50 additions and 107 deletions

View file

@ -1,3 +1,8 @@
# Version 1.4.7
## Fixes
- Fix missing body in async function execution in [#6988](https://github.com/appwrite/appwrite/pull/6988)
# Version 1.4.6
## Changes

View file

@ -89,7 +89,7 @@ $ git push origin [name_of_your_new_branch]
To set up a working **development environment**, just fork the project git repository and install the backend and frontend dependencies using the proper package manager and create run the docker-compose stack.
> If you just want to install Appwrite for day-to-day use and not as a contributor, you can reference the [installation guide](https://github.com/appwrite/appwrite#installation), the [getting started guide](https://appwrite.io/docs/getting-started-for-web), or the main [README](README.md) file.
> If you just want to install Appwrite for day-to-day use and not as a contributor, you can reference the [installation guide](https://github.com/appwrite/appwrite#installation), the [getting started guide](https://appwrite.io/docs/quick-starts), or the main [README](README.md) file.
```bash
git clone git@github.com:[YOUR_FORK_HERE]/appwrite.git
@ -454,7 +454,7 @@ From time to time, our team will add tutorials that will help contributors find
- [Adding Support for a New OAuth2 Provider](./docs/tutorials/add-oauth2-provider.md)
- [Appwrite Environment Variables](./docs/tutorials/add-environment-variable.md)
- [Running in Production](https://appwrite.io/docs/production)
- [Running in Production](https://appwrite.io/docs/advanced/self-hosting/production)
- [Adding Storage Adapter](./docs/tutorials/add-storage-adapter.md)
## Other Ways to Help

View file

@ -66,7 +66,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.4.6
appwrite/appwrite:1.4.7
```
### Windows
@ -78,7 +78,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.4.6
appwrite/appwrite:1.4.7
```
#### PowerShell
@ -88,7 +88,7 @@ docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.4.6
appwrite/appwrite:1.4.7
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。

View file

@ -76,7 +76,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.4.6
appwrite/appwrite:1.4.7
```
### Windows
@ -88,7 +88,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.4.6
appwrite/appwrite:1.4.7
```
#### PowerShell
@ -98,7 +98,7 @@ docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.4.6
appwrite/appwrite:1.4.7
```
Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.

View file

@ -100,7 +100,11 @@ App::post('/v1/projects')
$backups['database_db_fra1_v14x_07'] = ['from' => '00:00', 'to' => '02:00'];
$databases = Config::getParam('pools-database', []);
$databaseSelfHosted = 'database_db_fra1_self_hosted_0_0';
$selfHostedIndex = array_search($databaseSelfHosted, $databases);
if ($selfHostedIndex !== false) {
unset($databases[$selfHostedIndex]);
}
/**
* Remove databases from the list that are currently undergoing an backup
@ -175,10 +179,10 @@ App::post('/v1/projects')
* Update database with self-managed db every $mod projects
*/
$mod = 20;
$index = array_search('database_db_fra1_self_hosted_0_0', $databases);
if ($index !== false && ($project->getInternalId() % $mod === 0)) {
$project->setAttribute('database', $databases[$index]);
$dbForConsole->updateDocument('projects', $project);
if ($project->getInternalId() % $mod === 0 && $selfHostedIndex !== false) {
$database = $databaseSelfHosted;
$project->setAttribute('database', $database);
$dbForConsole->updateDocument('projects', $project->getId(), $project);
}
$dbForProject = new Database($pools->get($database)->pop()->getResource(), $cache);

View file

@ -110,7 +110,7 @@ const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours
const APP_USER_ACCCESS = 24 * 60 * 60; // 24 hours
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
const APP_CACHE_BUSTER = 514;
const APP_VERSION_STABLE = '1.4.6';
const APP_VERSION_STABLE = '1.4.7';
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
const APP_DATABASE_ATTRIBUTE_IP = 'ip';

View file

@ -64,7 +64,7 @@
"utopia-php/preloader": "0.2.*",
"utopia-php/queue": "0.5.*",
"utopia-php/registry": "0.5.*",
"utopia-php/storage": "0.17.*",
"utopia-php/storage": "0.18.*",
"utopia-php/swoole": "0.5.*",
"utopia-php/vcs": "0.5.*",
"utopia-php/websocket": "0.1.*",

115
composer.lock generated
View file

@ -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": "6ff937a260c3e0c09de9eb5e073d830d",
"content-hash": "06c2610579f319495ea7d2d28f42d376",
"packages": [
{
"name": "adhocore/jwt",
@ -851,72 +851,6 @@
},
"time": "2021-10-08T21:21:46+00:00"
},
{
"name": "laravel/pint",
"version": "v1.2.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/pint.git",
"reference": "e60e2112ee779ce60f253695b273d1646a17d6f1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/e60e2112ee779ce60f253695b273d1646a17d6f1",
"reference": "e60e2112ee779ce60f253695b273d1646a17d6f1",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
"ext-tokenizer": "*",
"ext-xml": "*",
"php": "^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.11.0",
"illuminate/view": "^9.32.0",
"laravel-zero/framework": "^9.2.0",
"mockery/mockery": "^1.5.1",
"nunomaduro/larastan": "^2.2.0",
"nunomaduro/termwind": "^1.14.0",
"pestphp/pest": "^1.22.1"
},
"bin": [
"builds/pint"
],
"type": "project",
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Seeders\\": "database/seeders/",
"Database\\Factories\\": "database/factories/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nuno Maduro",
"email": "enunomaduro@gmail.com"
}
],
"description": "An opinionated code formatter for PHP.",
"homepage": "https://laravel.com",
"keywords": [
"format",
"formatter",
"lint",
"linter",
"php"
],
"support": {
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
"time": "2022-11-29T16:25:20+00:00"
},
{
"name": "league/csv",
"version": "9.7.1",
@ -1972,16 +1906,16 @@
},
{
"name": "utopia-php/database",
"version": "0.44.2",
"version": "0.44.3",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "591cadbc2c622a3304aae9a16ebfdbe75ef33a06"
"reference": "b2d403c25a77506e03db5736335b0cae52bcc18a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/591cadbc2c622a3304aae9a16ebfdbe75ef33a06",
"reference": "591cadbc2c622a3304aae9a16ebfdbe75ef33a06",
"url": "https://api.github.com/repos/utopia-php/database/zipball/b2d403c25a77506e03db5736335b0cae52bcc18a",
"reference": "b2d403c25a77506e03db5736335b0cae52bcc18a",
"shasum": ""
},
"require": {
@ -1994,7 +1928,7 @@
},
"require-dev": {
"fakerphp/faker": "^1.14",
"laravel/pint": "1.4.*",
"laravel/pint": "1.13.*",
"pcov/clobber": "^2.0",
"phpstan/phpstan": "1.10.*",
"phpunit/phpunit": "^9.4",
@ -2022,9 +1956,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/0.44.2"
"source": "https://github.com/utopia-php/database/tree/0.44.3"
},
"time": "2023-10-19T07:39:00+00:00"
"time": "2023-10-24T10:13:48+00:00"
},
{
"name": "utopia-php/domains",
@ -2808,16 +2742,16 @@
},
{
"name": "utopia-php/storage",
"version": "0.17.0",
"version": "0.18.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/storage.git",
"reference": "efec5376c02d3d8330f1beb1469e6d6e313e21ee"
"reference": "983e6dee137012f9f57f126d3c79aab54e4e8824"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/storage/zipball/efec5376c02d3d8330f1beb1469e6d6e313e21ee",
"reference": "efec5376c02d3d8330f1beb1469e6d6e313e21ee",
"url": "https://api.github.com/repos/utopia-php/storage/zipball/983e6dee137012f9f57f126d3c79aab54e4e8824",
"reference": "983e6dee137012f9f57f126d3c79aab54e4e8824",
"shasum": ""
},
"require": {
@ -2857,9 +2791,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/storage/issues",
"source": "https://github.com/utopia-php/storage/tree/0.17.0"
"source": "https://github.com/utopia-php/storage/tree/0.18.1"
},
"time": "2023-08-21T11:28:36+00:00"
"time": "2023-10-24T14:44:19+00:00"
},
{
"name": "utopia-php/swoole",
@ -2914,26 +2848,25 @@
},
{
"name": "utopia-php/system",
"version": "0.7.1",
"version": "0.7.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/system.git",
"reference": "01bf0d283aded0ee0a7a6e5ff540acf64270ab27"
"reference": "4593d4d334b0c15879c4744a826e0362924c5d66"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/system/zipball/01bf0d283aded0ee0a7a6e5ff540acf64270ab27",
"reference": "01bf0d283aded0ee0a7a6e5ff540acf64270ab27",
"url": "https://api.github.com/repos/utopia-php/system/zipball/4593d4d334b0c15879c4744a826e0362924c5d66",
"reference": "4593d4d334b0c15879c4744a826e0362924c5d66",
"shasum": ""
},
"require": {
"laravel/pint": "1.2.*",
"php": ">=8.0.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"squizlabs/php_codesniffer": "^3.6",
"vimeo/psalm": "4.0.1"
"laravel/pint": "1.13.*",
"phpstan/phpstan": "1.10.*",
"phpunit/phpunit": "9.6.*"
},
"type": "library",
"autoload": {
@ -2965,9 +2898,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/system/issues",
"source": "https://github.com/utopia-php/system/tree/0.7.1"
"source": "https://github.com/utopia-php/system/tree/0.7.2"
},
"time": "2023-08-30T09:14:37+00:00"
"time": "2023-10-20T01:39:17+00:00"
},
{
"name": "utopia-php/vcs",
@ -5889,5 +5822,5 @@
"platform-overrides": {
"php": "8.0"
},
"plugin-api-version": "2.2.0"
"plugin-api-version": "2.6.0"
}

View file

@ -71,6 +71,7 @@ abstract class Migration
'1.4.4' => 'V19',
'1.4.5' => 'V19',
'1.4.6' => 'V19',
'1.4.7' => 'V19',
];
/**

View file

@ -77,7 +77,7 @@ class Functions extends Action
$type = $payload['type'] ?? '';
$events = $payload['events'] ?? [];
$data = $payload['data'] ?? '';
$data = $payload['body'] ?? '';
$eventData = $payload['payload'] ?? '';
$project = new Document($payload['project'] ?? []);
$function = new Document($payload['function'] ?? []);