1
0
Fork 0
mirror of synced 2024-07-04 06:00:53 +12:00

Merge branch '1.5.x' into providers-from-attribute

This commit is contained in:
Prateek Banga 2023-10-26 02:11:12 +05:30 committed by GitHub
commit 9545e4ac72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 40 additions and 19 deletions

View file

@ -16,7 +16,6 @@ jobs:
with:
fetch-depth: 2
submodules: recursive
ref: cl-1.4.x
- name: Login to Docker Hub
uses: docker/login-action@v2

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

@ -92,14 +92,19 @@ App::post('/v1/projects')
$projectId = ($projectId == 'unique()') ? ID::unique() : $projectId;
$backups['database_db_fra1_v14x_02'] = ['from' => '03:00', 'to' => '04:00'];
$backups['database_db_fra1_v14x_03'] = ['from' => '00:00', 'to' => '01:00'];
$backups['database_db_fra1_v14x_04'] = ['from' => '00:00', 'to' => '01:00'];
$backups['database_db_fra1_v14x_05'] = ['from' => '00:00', 'to' => '01:00'];
$backups['database_db_fra1_v14x_06'] = ['from' => '00:00', 'to' => '01:00'];
$backups['database_db_fra1_v14x_07'] = ['from' => '00:00', 'to' => '01:00'];
$backups['database_db_fra1_v14x_02'] = ['from' => '03:00', 'to' => '05:00'];
$backups['database_db_fra1_v14x_03'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_04'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_05'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_06'] = ['from' => '00:00', 'to' => '02:00'];
$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
@ -123,7 +128,7 @@ App::post('/v1/projects')
$databaseOverride = App::getEnv('_APP_DATABASE_OVERRIDE', null);
$index = array_search($databaseOverride, $databases);
if ($index) {
if ($index !== false) {
$database = $databases[$index];
} else {
$database = $databases[array_rand($databases)];
@ -170,6 +175,16 @@ App::post('/v1/projects')
throw new Exception(Exception::PROJECT_ALREADY_EXISTS);
}
/**
* Update database with self-managed db every $mod projects
*/
$mod = 20;
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);
$dbForProject->setNamespace("_{$project->getInternalId()}");
$dbForProject->create();

View file

@ -105,7 +105,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

@ -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'] ?? []);

View file

@ -5,6 +5,7 @@ namespace Appwrite\Platform\Workers;
use Appwrite\Template\Template;
use Exception;
use PHPMailer\PHPMailer\PHPMailer;
use Swoole\Runtime;
use Utopia\App;
use Utopia\CLI\Console;
use Utopia\Platform\Action;
@ -39,7 +40,7 @@ class Mails extends Action
*/
public function action(Message $message, Registry $register): void
{
Runtime::setHookFlags(SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_TCP);
$payload = $message->getPayload() ?? [];
if (empty($payload)) {