mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: scale databases worker to handle parallel test load
The root cause of flaky attribute processing tests is that a single appwrite-worker-databases container cannot keep up with attribute creation jobs when tests run in parallel via paratest. This fix: - Scales the databases worker to 4 instances during E2E service tests - Reverts timeout increases that masked the underlying issue Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
fb2dc89041
commit
1ef96627d3
@@ -201,7 +201,7 @@ jobs:
|
||||
run: |
|
||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||
sed -i 's|^_APP_BROWSER_HOST=.*|_APP_BROWSER_HOST=http://invalid-browser/v1|' .env
|
||||
docker compose up -d
|
||||
docker compose up -d --scale appwrite-worker-databases=4
|
||||
sleep 30
|
||||
|
||||
- name: Wait for Open Runtimes
|
||||
@@ -284,7 +284,7 @@ jobs:
|
||||
- name: Load and Start Appwrite
|
||||
run: |
|
||||
docker load --input /tmp/${{ env.IMAGE }}.tar
|
||||
docker compose up -d
|
||||
docker compose up -d --scale appwrite-worker-databases=4
|
||||
sleep 30
|
||||
|
||||
- name: Wait for Open Runtimes
|
||||
|
||||
@@ -19,7 +19,7 @@ trait SchemaPolling
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForAttribute(string $databaseId, string $containerId, string $attributeKey, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
protected function waitForAttribute(string $databaseId, string $containerId, string $attributeKey, int $timeoutMs = 180000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId, $attributeKey) {
|
||||
$attribute = $this->client->call(
|
||||
@@ -46,7 +46,7 @@ trait SchemaPolling
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForAttributes(string $databaseId, string $containerId, array $attributeKeys, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
protected function waitForAttributes(string $databaseId, string $containerId, array $attributeKeys, int $timeoutMs = 180000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId, $attributeKeys) {
|
||||
$container = $this->client->call(
|
||||
@@ -87,7 +87,7 @@ trait SchemaPolling
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForAttributeCount(string $databaseId, string $containerId, int $count, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
protected function waitForAttributeCount(string $databaseId, string $containerId, int $count, int $timeoutMs = 180000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId, $count) {
|
||||
$container = $this->client->call(
|
||||
@@ -126,7 +126,7 @@ trait SchemaPolling
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForIndex(string $databaseId, string $containerId, string $indexKey, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
protected function waitForIndex(string $databaseId, string $containerId, string $indexKey, int $timeoutMs = 180000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId, $indexKey) {
|
||||
$index = $this->client->call(
|
||||
@@ -154,7 +154,7 @@ trait SchemaPolling
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForAllIndexes(string $databaseId, string $containerId, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
protected function waitForAllIndexes(string $databaseId, string $containerId, int $timeoutMs = 180000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId) {
|
||||
$container = $this->client->call(
|
||||
@@ -182,10 +182,10 @@ trait SchemaPolling
|
||||
*
|
||||
* @param string $databaseId The database ID
|
||||
* @param string $containerId The collection/table ID
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds (default 10 minutes for CI stability)
|
||||
* @param int $timeoutMs Maximum time to wait in milliseconds (default 3 minutes for CI stability)
|
||||
* @param int $waitMs Time between polling attempts in milliseconds
|
||||
*/
|
||||
protected function waitForAllAttributes(string $databaseId, string $containerId, int $timeoutMs = 600000, int $waitMs = 500): void
|
||||
protected function waitForAllAttributes(string $databaseId, string $containerId, int $timeoutMs = 180000, int $waitMs = 500): void
|
||||
{
|
||||
$this->assertEventually(function () use ($databaseId, $containerId) {
|
||||
$container = $this->client->call(
|
||||
|
||||
Reference in New Issue
Block a user