Commit Graph
32460 Commits
Author SHA1 Message Date
eldadfux addba2cdb7 Refactor OAuth provider checks in account controller
Updated the handling of OAuth provider configurations to ensure that defaults are set when parameters are missing. This change improves error handling by checking for null values and ensuring class existence before proceeding with OAuth operations.
2026-02-22 11:42:12 +01:00
Jake BarnbyandClaude Opus 4.6 f2759cb65a fix: remove file caching, disable --functional for Databases/Functions/Realtime
Services that depend on shared static state between test methods
(Databases, Functions, Realtime) now run without --functional flag,
so test methods execute sequentially within each class while classes
still run in parallel. All other services keep --functional mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 03:44:28 +13:00
Jake BarnbyandClaude Opus 4.6 32c84ae869 fix: retry on TCP connection errors in callWithAuthRetry for Functions tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 03:29:31 +13:00
Jake BarnbyandClaude Opus 4.6 48698f40ba fix: add polling and delay for testSSRLogs logging config propagation
After setting logging=false, the site runtime may not immediately pick up
the config change. Add a 5s delay and poll for the NEW log entry (filtering
out the old one by $id) to avoid picking up stale log entries with content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 03:12:44 +13:00
Jake BarnbyandClaude Opus 4.6 8d18a33072 fix: call ensureSharedProject() in all setup methods, not just setupDatabase
When setupAttributes/setupIndexes/etc hit the file cache, they return
immediately without calling setupDatabase(), so ensureSharedProject()
was never called. This left self::$project empty, causing getProject()
to create a new project that didn't match the cached database IDs (404s).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 03:11:50 +13:00
Jake BarnbyandClaude Opus 4.6 a0b8437f08 fix: scope file caching to Database tests only, revert for non-Database tests
The previous file caching approach cached getRoot(), getUser(), getProject(),
and getConsoleVariables() globally. This caused all test methods in a class
to share the same project, breaking non-Database tests that expect isolated
state (Account 401s, Storage 500s, Users 404s, etc.).

Now file caching is only applied in Database/Transaction test setup chains:
- ensureSharedProject() in DatabasesBase, TransactionsBase, TransactionPermissionsBase
  creates and file-caches both the project AND user so all methods share
  consistent project + user state (needed for collection permissions)
- Non-Database tests (Account, Storage, Users, etc.) create their own
  isolated projects per-process as before

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 02:46:56 +13:00
Jake BarnbyandClaude Opus 4.6 3ea1e8e59f fix: add file-based cross-process caching for ParaTest --functional mode
With --functional mode, each test method runs in its own process so
static caches are empty. This causes every method to recreate projects,
databases, collections, attributes, and indexes - flooding the serial
database worker queue and causing attribute polling timeouts.

File-based caching with file locks ensures resources are created once
per test class, then shared across all method processes. This restores
--functional mode and dramatically reduces worker queue load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 01:47:20 +13:00
Chirag Aggarwal 7737139f23 composer 2026-02-20 17:59:33 +05:30
Atharva Deosthale a803bafbb8 feat: add cursor-plugin SDK support 2026-02-20 17:54:50 +05:30
HemachandarandGitHub 15b5202c16 Check project access only when user is present (#11370) 2026-02-20 17:37:12 +05:30
Eldad A. FuxandGitHub e45254d456 Merge pull request #11364 from appwrite/fix-dsn-vcs-error
Enhance error handling for project database configuration
2026-02-20 12:58:38 +01:00
Jake BarnbyandClaude Opus 4.6 8be633a140 fix: remove --functional from paratest to use class-level parallelism
With --functional mode, every test method gets its own process with no
static cache sharing. This causes each method to independently create
databases, collections, and attributes, flooding the serial database
worker queue. Without --functional, each test class shares static caches
between methods, dramatically reducing schema operation count.

Also reverts _APP_WORKERS_NUM change since worker must remain serial.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 00:38:39 +13:00
Jake BarnbyandClaude Opus 4.6 31f4260908 fix: increase database worker count and test resilience for parallel execution
Parallel test execution via ParaTest creates more queue load than a single
database worker can handle, causing attributes to get stuck at 'processing'.
Increase _APP_WORKERS_NUM to 4 to match parallelism, increase WebSocket
timeout from 15s to 30s, and add retry logic for proxy requests in Sites tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 00:16:40 +13:00
Chirag Aggarwal 7fc2c93529 lock file 2026-02-20 16:34:10 +05:30
0f3ea91d5d Update app/init/resources.php
Co-authored-by: Matej Bačo <matejbacocom@gmail.com>
2026-02-20 11:41:09 +01:00
eldadfux 92439ef0c4 format 2026-02-20 11:39:28 +01:00
Chirag Aggarwal 619fe72693 use diff check 2026-02-20 16:05:36 +05:30
8e4fddddbc Update app/init/resources.php
Co-authored-by: Matej Bačo <matejbacocom@gmail.com>
2026-02-20 11:24:42 +01:00
Matej Bačo e2bc3afce6 Fix url params in redirect URLs 2026-02-20 11:15:59 +01:00
Jake BarnbyandClaude Opus 4.6 818c89fe23 fix: increase site deployment build and activation polling timeouts
Build timeout: 120s → 240s
Activation timeout: 60s → 120s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 22:37:41 +13:00
Chirag Aggarwal 02951064ef bump composer 2026-02-20 14:09:44 +05:30
Chirag Aggarwal 0431337b22 chore: remove sdk release artifacts from automation PR 2026-02-20 14:04:06 +05:30
Chirag Aggarwal a9d2fed1ba chore: split sdk release artifacts from automation 2026-02-20 14:02:16 +05:30
Jake BarnbyandClaude Opus 4.6 58bf529183 fix: make testGetAccountLogs flexible for 1 or 2 audit logs
The user.create audit may or may not be present depending on async
audit processing timing. Accept either count and adjust offset/limit
assertions accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:28:09 +13:00
Chirag AggarwalandGitHub b9ea24eeb8 Merge pull request #11367 from appwrite/fix-invalid-type
fix: invalid type error from resources endpoint
2026-02-20 13:49:24 +05:30
Jake BarnbyandClaude Opus 4.6 abdceb831a fix: resolve E2E test failures for screenshots, account logs, risky tests, and deployment timeouts
- Accept 404 alongside 200 for screenshot tests with custom headers/permissions (browser service CI limitation)
- Fix testGetAccountLogs to expect 1 log (session.create only, user.create audit not triggered for self-service)
- Move getSupportForOperators() check before any assertions in testOperators/testBulkOperators (PHPUnit 12 risky test fix)
- Increase deployment build/activation polling timeout from 240s to 360s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 20:43:51 +13:00
Jake BarnbyandGitHub 2dc503d0de Merge pull request #11363 from appwrite/fix-CLOUD-3JBN
Fix CLOUD-3JBN
2026-02-20 20:04:51 +13:00
Jake BarnbyandClaude Opus 4.6 b976454416 fix: add early failure detection and increase polling timeouts
Throw Critical exception when attribute/index/deployment status is
'failed' to fail tests immediately instead of waiting 15-20 minutes.
Increase default schema polling timeouts from 15 to 20 minutes for
CI stability under parallel load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:51:59 +13:00
Jake BarnbyandClaude Opus 4.6 b7d503e8e9 fix: resolve MariaDB spatial attribute and index creation failures
- Replace findOne()->isEmpty() with count() > 0 in spatial check to avoid
  potential false positives when checking for existing data in empty collections
- Use waitForAllAttributes instead of waitForAttribute before spatial index
  creation to ensure the collection document cache is refreshed
- Add response assertions for attribute creation in testSpatialPolygonAttributes
  to fail fast instead of timing out for 15 minutes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:53:50 +13:00
Chirag Aggarwal ee223046e0 fix: invalid type error from resources endpoint 2026-02-20 11:22:23 +05:30
Jake BarnbyandClaude Opus 4.6 168f9828bc fix: make activate param optional in site deployments
The activate param in Deployments/Create was missing the optional flag,
making it required unlike the VCS and Template deployment endpoints.
This caused 400 errors for multipart/form-data requests where the param
was present but treated as missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 17:40:31 +13:00
Jake BarnbyandClaude Opus 4.6 89f0f227d6 fix: resolve CI failures in database, functions, and realtime tests
- Increase SchemaPolling default timeouts from 8min to 15min for
  waitForAttribute, waitForAttributes, waitForAttributeCount, and
  waitForIndex to match waitForAllAttributes/waitForAllIndexes. Under
  parallel test load the database worker gets backlogged, causing
  attributes to stay in 'processing' state longer than 8 minutes.
- Add isEmpty check in Functions Delete before updating schedules to
  prevent 500 errors when the schedule document is missing (consistent
  with other modules like Executions/Delete).
- Add retry logic to cleanupFunction in FunctionsBase for transient
  MongoDB transaction abort errors during function deletion.
- Increase Realtime attribute/index polling timeouts from 2min to 15min
  to handle worker backlog under CI load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 17:22:51 +13:00
eldadfux f9ed35ed8a Enhance error handling for project database configuration
* Added checks to ensure project references a valid database and throws exceptions if not configured.
* Improved error messaging for non-existent projects in VCS controller.
2026-02-19 20:28:29 +01:00
eldadfux 9c597623ff fix: handle null authorization in realtime connections
Added a check to initialize the authorization object with an empty string if it is null when processing messages in the realtime server. This ensures that the database authorization is always set, preventing potential errors during message handling.
2026-02-19 19:50:48 +01:00
Jake BarnbyandClaude Opus 4.6 0b7c8865f5 fix: increase E2E test timeout from 30 to 40 minutes
Database tests (PostgreSQL, Shared V1, Shared V2) consistently take
31-32 minutes, just exceeding the 30-minute timeout. Increase to 40
minutes for all E2E service tests to prevent false timeout failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 04:19:44 +13:00
Jake BarnbyandClaude Opus 4.6 a952dad8d3 fix: add missing Role import and convert @group to PHP 8 attributes
- Add missing `use Utopia\Database\Helpers\Role` import in ProjectsBase.php
  (fixes "Class Role not found" fatal error)
- Convert @group ciIgnore docblock annotations to #[Group('ciIgnore')]
  PHP 8 attributes (PHPUnit 12 no longer supports docblock annotations)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 03:26:15 +13:00
Jake BarnbyandClaude Opus 4.6 2a535a2adc fix: exclude ciIgnore tests from CI and increase Realtime polling timeouts
- Add --exclude-group ciIgnore to paratest commands in tests.yml
  (the @group ciIgnore annotation was defined but never excluded)
- Increase attribute/index polling timeouts in RealtimeConsoleClientTest
  from 15s to 120s for Shared V2 stability

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 03:10:56 +13:00
Jake BarnbyandClaude Opus 4.6 b645721e14 fix: resolve CI failures from 1.8.x merge
- Remove unused WhiteList import in teams.php (linter fix)
- Add missing $teamId and $newTeam params to setupProject() in ProjectsBase.php (fixes 401 errors in all Projects tests)
- Filter execution logs by requestPath in testSSRLogs to avoid picking up screenshot worker executions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 02:46:23 +13:00
Chirag Aggarwal 0af495f241 release some sdks 2026-02-19 18:15:05 +05:30
Jake BarnbyandGitHub 8a6ddeef30 Merge branch '1.8.x' into feat-mongodb 2026-02-20 01:33:02 +13:00
Jake BarnbyandClaude Opus 4.6 8a391e2e27 fix: mark transactionId as required param in transaction endpoints
Path parameters should not be optional. This caused SDK TypeScript
build failures where transactionId was typed as string | undefined.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:36:41 +13:00
HemachandarandGitHub 14e79f34db Populate project-specific roles (#11209)
* Populate project-specific roles

* better comments

* simplify

* privileged user

* update permissions

* feedback

* lint

* only read + cleanup

* fix role length

* scopes

* not api-key

* cl-ignore group

* rename

* ciIgnore

* base scope

* change base scope

* fix projects

* copilot suggestion
2026-02-19 16:48:39 +05:30
Chirag Aggarwal 035227312f add back spacing 2026-02-19 15:53:00 +05:30
Chirag Aggarwal fe48882e6c feat(sdks): automate sdk version/changelog with assistant 2026-02-19 15:39:11 +05:30
e902d3b6ad fix: sanitize branch names for valid domain generation (#11245)
* fix: sanitize branch names for valid domain generation

Branch names containing invalid domain characters (like '/') were being
used directly when creating VCS preview domains, resulting in invalid
domains like 'branch-abc/test.appwrite.network'. This adds a Domain
helper class that sanitizes branch names by replacing invalid characters
with hyphens before generating domains.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: use Text constants for branch name sanitization

Replace regex with explicit character validation using Utopia Text
constants for better readability and maintainability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Move to transformation adapter

* lint

* tiny

* fix test

* ut

* use Filter

* lint

* more lint

* simplify

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 14:37:01 +05:30
Matej BačoandGitHub cdb6a2985f Merge pull request #11355 from appwrite/fix-rule-domains
Convert rule domains to lowercase
2026-02-19 09:42:34 +01:00
Jake BarnbyandClaude Opus 4.6 c2e4ddc177 fix: bump utopia-php/database to 5.3.2
Includes fix for empty orderAsc() attribute mapping in MongoDB adapter
that caused subQueryVariables filter to hang and crash the service.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:05:47 +13:00
Jake BarnbyandClaude Opus 4.6 ce0b7ab455 fix: increase function deployment build timeout to 4 minutes
FunctionsBase deployment polling was only 100 seconds, insufficient
under CI load when build workers are busy. Increased to 240 seconds
for both deployment readiness and activation checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 06:10:18 +13:00
Jake BarnbyandClaude Opus 4.6 c1cb7bdc8e fix: increase schema polling timeouts to 15 minutes
Spatial attribute creation under parallel CI load consistently exceeds
10 minutes. Increased both waitForAllAttributes and waitForAllIndexes
from 10/8 minutes to 15 minutes to accommodate heavy parallel load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 05:12:09 +13:00
Hemachandar 702484c27b lowercase only id 2026-02-18 21:12:56 +05:30