Commit Graph

32166 Commits

Author SHA1 Message Date
Jake Barnby 0737ba1329 fix: Make more tests parallel-safe for functional mode
- Account: Use unique emails/phone numbers to avoid collisions
- Functions: Use flexible assertions for counts and search results
- GraphQL: Add better error handling and use unique IDs
- Projects: Use assertGreaterThanOrEqual for list counts
- Webhooks: Use probe to find specific delete webhook event

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:48:55 +13:00
Matej Bačo 2ad0135890 Merge pull request #11249 from appwrite/ser-1092-v2
Create rule in SSL task
2026-02-06 09:34:26 +01:00
Jake Barnby 627def5993 fix: Make Functions testListDeployments parallel-safe
- Use foreach loop to check all deployments instead of hardcoded indices
- Fix offset test to not assume exactly 1 function exists

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:25:10 +13:00
Jake Barnby 6e103393b8 fix: Fix undefined $data variables in Webhooks tests
- testCreateAttributes: Use $actorsId instead of undefined $data['actorsId']
- testCreateColumns: Use $actorsId instead of undefined $data['actorsId']
- testCreateAccountSession: Add assertion for account creation success

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:23:44 +13:00
Jake Barnby a4cca146d3 fix: Remove undefined $totalUsers and use parallel-safe assertions
The testListUsers function was using $totalUsers which was removed when
the test was refactored for parallel execution. Now uses $minUsers and
flexible assertions instead of position-based assertions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:22:14 +13:00
Jake Barnby e605848541 perf: Enable --functional mode for true method-level parallelism
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:19:38 +13:00
Jake Barnby 9f9d195daf fix: Add retry logic and defensive checks for Teams owner downgrade test
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:16:41 +13:00
Jake Barnby a79f33a3a1 fix: Remove incorrect json_decode in setupUser
The client body is already decoded as array, not JSON string.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:13:23 +13:00
Jake Barnby 6be719c9d4 fix: Add retry logic for 401 errors in ProjectCustom::getProject
Under high parallel load, authentication can transiently fail with 401.
Add retry logic with delays to handle these transient failures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:07:00 +13:00
Jake Barnby ce200d20d4 fix: Make webhook account tests self-sufficient
Update account name before testing to ensure webhook data has
expected 'New Name' value, regardless of test execution order.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:59:58 +13:00
Jake Barnby 8627251ae4 fix: Make testDeleteStorageBucket self-sufficient
Update bucket name before deleting to ensure webhook data has
expected name, regardless of whether testUpdateStorageBucket ran.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:59:16 +13:00
Jake Barnby 1f17dca7c9 fix: Handle 409 conflicts in GraphQL TablesDB tests
- setupDatabase() now fetches existing database on conflict
- setupTable() now fetches existing tables on conflict
- Enables parallel test execution with fixed resource IDs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:56:45 +13:00
Jake Barnby 0e828f3fcc fix: Handle 409 conflicts in GraphQL Legacy tests
- setupDatabase() now fetches existing database on conflict
- setupCollections() now fetches existing collections on conflict
- Enables parallel test execution with fixed resource IDs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:55:59 +13:00
Jake Barnby d4020686f2 fix: Make testListUsers parallel-safe
- Use assertGreaterThanOrEqual instead of exact count
- Find users by ID instead of assuming position
- Document expected minimum user count for isolated execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:53:42 +13:00
Jake Barnby de8915b416 fix: Make testListBucket self-sufficient for parallel execution
Create bucket1 within testListBucket instead of relying on
testCreateBucket running first. Accept 409 if bucket already exists.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:47:29 +13:00
Jake Barnby fd8e8fc736 fix: Make Storage cursorAfter test parallel-safe
Use assertGreaterThanOrEqual and find bucket by ID instead of
assuming exact count and position after cursor query.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:42:43 +13:00
Jake Barnby 07c9a274b1 fix: Use assertGreaterThanOrEqual for fileSecurity bucket count
In parallel execution, there may be more buckets with fileSecurity=true

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:36:21 +13:00
Jake Barnby 40ed0da8b3 fix: Fix testUpdateAccountNameSearch for parallel execution
Use assertGreaterThanOrEqual and find user by ID instead of assuming position

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:27:47 +13:00
Jake Barnby a2ae55dcbe fix: Improve parallel test isolation for Account, Storage, Messaging
- Account: Add createFreshAccountWithSession() for predictable session/log counts
- Account: Update testGetAccountSessions and testGetAccountLogs to use fresh accounts
- Storage: Fix testListBucket to find bucket by ID instead of assuming first position
- Messaging: Fix testListSubscribers to find subscriber by ID instead of assuming first position

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:24:28 +13:00
Jake Barnby 6414c0ebda Merge pull request #11201 from appwrite/get-cursor-queries
Get cursor queries
2026-02-06 07:15:35 +00:00
Jake Barnby a3574032e3 Update src/Appwrite/Platform/Workers/Migrations.php 2026-02-06 12:27:10 +05:30
ArnabChatterjee20k 6c38c566d9 optimised the memory usage by resource aggregation 2026-02-06 12:27:09 +05:30
ArnabChatterjee20k 7997763532 linting 2026-02-06 12:26:35 +05:30
ArnabChatterjee20k bf84144201 updated reset of the stats usage worker to reset metrics 2026-02-06 12:25:59 +05:30
ArnabChatterjee20k 532ec364d2 updated migration version 2026-02-06 12:25:53 +05:30
ArnabChatterjee20k b517e502a9 lint 2026-02-06 12:25:38 +05:30
ArnabChatterjee20k 4396a0ef7e added processing of migration resource stats 2026-02-06 12:24:41 +05:30
ArnabChatterjee20k 6eaebaec1b updated compose 2026-02-06 11:49:41 +05:30
ArnabChatterjee20k 88e2d5c496 updated compose 2026-02-06 11:44:44 +05:30
ArnabChatterjee20k e3aaac7f9f Merge remote-tracking branch 'origin/1.8.x' into pg-adapter 2026-02-06 11:35:38 +05:30
Jake Barnby 801befeacd Merge branch '1.8.x' into get-cursor-queries 2026-02-06 05:59:48 +00:00
Jake Barnby 3b025fa12a fix: Make testCreateAttributes and testCreateIndexes parallel-safe
These tests were creating resources directly in the shared collections,
which conflicts with setupAttributes() and setupIndexes() when tests
run in parallel. Now each test creates its own dedicated collection
to avoid conflicts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 18:50:36 +13:00
Jake Barnby 941d40e704 Merge pull request #11260 from appwrite/localhost-endpoint
Localhost endpoint CSV
2026-02-06 05:49:55 +00:00
fogelito 093bc7bf3d Merge branch '1.8.x' of https://github.com/appwrite/appwrite into localhost-endpoint 2026-02-06 07:14:07 +02:00
fogelito 90f10ce685 Use https 2026-02-06 07:13:39 +02:00
Jake Barnby 945eb43558 fix: Use more entropy for email generation in parallel tests
Adding process ID and random bytes to uniqid() to avoid email
collisions when running tests in parallel with functional mode.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 18:00:27 +13:00
Jake Barnby 62e0598008 fix: Remove more invalid returns from void test methods
Removed return statements from testManyToOneRelationship and
testManyToManyRelationship which were declared as void. These
cause PHP fatal errors in PHP 8.4+.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:46:42 +13:00
Jake Barnby fd0a4a0e88 fix: Remove invalid return from void testUpdateDocument method
The testUpdateDocument method was declared as void but returned [].
This causes a PHP fatal error in PHP 8.4.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:36:20 +13:00
Jake Barnby 2a4ef06355 fix: Make Sites tests parallel-safe for --functional mode
Add search filters to isolate test data in testListSites to prevent
count assertions from failing when other test methods create sites
during parallel execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:24:57 +13:00
Jake Barnby 2d160747ca perf: Remove @depends from Migrations, Projects, and Tokens tests
Added helper methods with static caching for independent test execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 12:13:54 +13:00
Jake Barnby 2a3e2d8be5 perf: Remove @depends from all GraphQL tests
Added helper methods with static caching for:
- Legacy/DatabaseClientTest.php
- Legacy/DatabaseServerTest.php
- TablesDB/DatabaseClientTest.php
- TablesDB/DatabaseServerTest.php

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 12:01:31 +13:00
Jake Barnby e976617869 perf: Remove @depends from Databases permissions and partial GraphQL tests
- Added setupDatabase() helper with caching to all permission test files
- Removed @depends from LegacyPermissionsMemberTest, LegacyPermissionsTeamTest
- Removed @depends from TablesDBPermissionsMemberTest, TablesDBPermissionsTeamTest
- Partial GraphQL test updates from agents

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:56:58 +13:00
Jake Barnby f624646480 perf: Remove @depends from Account, Functions, Storage, Users, VCS, Messaging tests
Added helper methods with static caching to enable parallel test execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:54:14 +13:00
Hemachandar 45e74d7b3d rule 2026-02-06 00:14:15 +05:30
Jake Barnby f5f60ab85b perf: Remove @depends from Database Transactions tests
Enables parallel test execution for Transactions tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 04:47:23 +13:00
Jake Barnby b1257cc40a perf: Remove @depends from Webhooks and Teams tests
Enables --functional mode for parallel test execution by:
- Adding helper methods for independent test setup
- Removing all #[Depends] annotations
- Using static caching for shared resources

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 04:47:12 +13:00
Jake Barnby 02240fd14f fix: Correct TablesDB API paths in Realtime test helpers
- Use /databases endpoint instead of /tablesdb for database creation
- Use /columns/string instead of /attributes/string for table columns
- Fix testAttributesCollectionsAPI return type from array to void

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 04:46:59 +13:00
Jake Barnby 24f8275f52 Revert "fix: run Databases and FunctionsSchedule tests sequentially"
This reverts commit 8dadcfeebe.
2026-02-06 04:36:55 +13:00
Jake Barnby 2e9c1b4745 fix: Remove @depends chains from Realtime tests for parallel execution
- Add helper methods createCollectionWithAttribute(), createTableWithAttribute(),
  createCollectionWithIndex(), createTableWithIndex() to RealtimeConsoleClientTest
- Add createTeam() helper to RealtimeCustomClientTest
- Replace all @depends annotations with direct helper method calls
- Enable tests to run in parallel with --functional flag

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 04:28:12 +13:00
Jake Barnby 8dadcfeebe fix: run Databases and FunctionsSchedule tests sequentially
Parallel test execution with paratest overwhelms the single databases
worker when many tests create attributes simultaneously. Run these
specific services sequentially with PHPUnit to ensure the worker
can keep up with attribute processing jobs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 04:15:56 +13:00