Commit Graph

32166 Commits

Author SHA1 Message Date
Jake Barnby e92b80b3cb Merge branch '1.8.x' into feat-mongodb 2026-02-24 02:53:40 +13:00
Chirag Aggarwal 99df4c4d02 Merge pull request #11360 from appwrite/feat/assistant-sdk-release-automation
feat(sdks): automate AI SDK release version and changelog updates
2026-02-23 18:30:58 +05:30
Luke B. Silver 8c48c764a9 Merge pull request #11383 from appwrite/telemetry/better-stats-logging
Remove superfluous logs from StatsResources worker
2026-02-23 12:21:44 +00:00
Chirag Aggarwal f9d6594955 composer 2026-02-23 17:43:11 +05:30
Chirag Aggarwal 40d5a9e43b Merge branch '1.8.x' into feat/assistant-sdk-release-automation 2026-02-23 17:42:52 +05:30
Matej Bačo f4ee6488ac Add tests for custom url schema in redirects 2026-02-23 13:09:26 +01:00
Matej Bačo 5414cc67ab Finalize html encoding rework 2026-02-23 12:54:20 +01:00
Chirag Aggarwal cf9148f0ac Merge pull request #11381 from appwrite/chore/fix-specs-generation
chore: remove examples from repo after migration to specs repo
2026-02-23 17:22:51 +05:30
Matej Bačo 2b6b66d8a4 Remove html encoding for urls 2026-02-23 12:45:18 +01:00
loks0n 44cd5bb7f0 Remove superfluous Console logs from StatsResources worker
Replace redundant Console::info/error/success logs with Span::add
for document count — all other details (project ID, sequence, region,
database, duration) are already captured by the telemetry span.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 11:36:11 +00:00
Jake Barnby 95c67ea155 fix: resolve merge conflict markers in composer.lock
The merge of 1.8.x into feat-mongodb left unresolved conflict markers
in composer.lock, breaking all CI checks. Resolved in favor of
feat-mongodb values (minimum-stability: dev, prefer-stable: true)
to match composer.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:17:55 +13:00
Jake Barnby 0019f01492 Merge branch '1.8.x' into feat-mongodb 2026-02-23 21:21:26 +13:00
Chirag Aggarwal c07a7b0ea4 fix: auto-create specs directory and improve SDK error messages
- Auto-create specs directory in Specs.php if it doesn't exist

- Add helpful error message in SDKs.php when specs are missing

- Remove docs/examples from git tracking (added to .gitignore)
2026-02-23 11:06:21 +05:30
Chirag Aggarwal e2d6b76a88 Merge pull request #11368 from appwrite/feat/assistant-sdk-release-artifacts
chore: split sdk release artifacts from automation
2026-02-23 09:53:03 +05:30
eldadfux 9cabe15219 Fix for console redirect warning 2026-02-22 20:38:42 +01:00
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 Barnby 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 Barnby 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 Barnby 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 Barnby 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 Barnby 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 Barnby 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
Hemachandar 15b5202c16 Check project access only when user is present (#11370) 2026-02-20 17:37:12 +05:30
Eldad A. Fux 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 Barnby 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 Barnby 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
Eldad A. Fux 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
Eldad A. Fux 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 Barnby 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 Barnby 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 Aggarwal 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 Barnby 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 Barnby 2dc503d0de Merge pull request #11363 from appwrite/fix-CLOUD-3JBN
Fix CLOUD-3JBN
2026-02-20 20:04:51 +13:00
Jake Barnby 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 Barnby 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 Barnby 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 Barnby 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 Barnby 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