Commit Graph
34313 Commits
Author SHA1 Message Date
Jake BarnbyandClaude Opus 4.7 7af9c7b19a fix(redis): drop unreachable default arm in resource match
PHPStan narrowed $dsnScheme to literal 'redis' after the other arms
were ruled out, making the default arm dead code.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 08:54:45 +12:00
Jake Barnby 8a7528c8a0 Merge remote-tracking branch 'origin/feat-memory-adapter-tests' into feat-memory-adapter-tests 2026-05-01 08:35:27 +12:00
Jake BarnbyandClaude Opus 4.7 6b0ddd79a3 chore(redis): strengthen warning on database-pool redis scheme
Stage-5 re-review C-Re2 outcome: the C8 decision was that Redis stays
on logs/console only, NOT on documentsdb/vectorsdb/database. However,
.github/workflows/ci.yml currently runs a Redis matrix entry with
_APP_DB_ADAPTER=redis that flows through the database pool.

Removing 'redis' from the database pool schemes here would break that
CI matrix entry. Per the fixup spec, do not remove it until the matrix
is reframed (point Redis at logs/console only) or dropped (rely on the
utopia-php/database adapter trait suite for coverage).

This commit replaces the soft NOTE with a loud WARNING that:
  - states unambiguously that Redis is logs/console only;
  - explains why 'redis' is still listed on the database pool today;
  - documents the two paths to remove it (CI reframe or matrix drop);
  - reaffirms that documentsdb/vectorsdb must NEVER allow 'redis'.

documentsdb and vectorsdb schemes were already redis-free; verified.

CONFLICT FLAGGED: this is the deviation called out in the fixup spec.
The C-Re2 fix cannot be completed in this pass without breaking CI.
Follow-up work: decide between reframing the CI matrix or dropping the
Redis matrix entry, then drop 'redis' from the 'database' and 'console'
pool schemes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 23:51:22 +12:00
Jake BarnbyandGitHub f0ad1b5b80 Merge branch '1.9.x' into feat-memory-adapter-tests 2026-04-30 23:42:34 +12:00
Jake BarnbyandClaude Opus 4.7 16e7284f33 fix(redis): scope to logs/console only; restore matrix generator
C8: Add a comment block above the connection pool definitions warning
that the `redis` scheme on the `database` and `logs` pools is for the
test matrix only — operators who set `_APP_DB_ADAPTER=redis` in
production will lose data on cache eviction or process restart.
Redis stays OFF the `documentsdb` and `vectorsdb` pools, which have
stricter durability and indexing requirements that the in-memory
Utopia Redis adapter does not provide.

M12: Restore the matrix-generator logic that picks the per-PR matrix
based on whether `composer.lock` changed `utopia-php/database`. PRs
that bump the database package run the full Mariadb+Postgres+Mongo+
Redis matrix in both dedicated and shared modes; everything else
runs the SQLite+Redis short matrix in shared mode. The previous
"TEMP — revert before merge" early `return` short-circuited that
logic and forced every PR through the short matrix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 23:37:46 +12:00
Jake Barnby 560a694ac7 chore: bump utopia-php/database to feat-redis-adapter Wave 2 consolidated SHA 2026-04-30 23:08:21 +12:00
Matej BačoandGitHub 08ad7d7f71 Merge pull request #12192 from appwrite/fix-oauth-bugs
Fix: OAuth UX with required params
cl-1.9.0-2
2026-04-30 13:07:52 +02:00
Matej Bačo 71300383b2 Update tests 2026-04-30 12:48:59 +02:00
Jake Barnby a3967f33ea chore(deps): pull feat-redis-adapter database branch 2026-04-30 22:48:10 +12:00
Matej Bačo 8785aa9877 Fix nullable implementation oauth 2026-04-30 12:41:55 +02:00
Jake BarnbyandClaude Opus 4.7 95e5a6e365 feat: wire Redis adapter as test backend (compose + registers + ci)
Wires the new Redis database adapter through the Appwrite stack:
- registers.php: add 'redis' to schemes for console/database/logs pools,
  add an explicit redis resource arm honouring the optional db segment,
  and dispatch to Utopia\Database\Adapter\Redis in the database match
- composer.json: switch utopia-php/database constraint to
  dev-feat-redis-adapter to pick up the new adapter (lockfile bump
  follows after the database PR is pushed to origin)
- docker-compose.yml: add a dedicated redis-mirror service with
  noeviction policy and AOF persistence so the database backend stays
  isolated from the cache instance
- ci.yml: add Redis to default and full database matrices and export
  the matching env vars (_APP_DB_HOST=redis-mirror, port 6379)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 22:37:46 +12:00
Matej Bačo 62b7d5558f Mark params nonrequired 2026-04-30 12:36:45 +02:00
Shmuel FogelandGitHub fbbab0f7e1 Merge pull request #12181 from appwrite/set-global-collection
Set global collection
2026-04-30 12:49:00 +03:00
Matej BačoandGitHub 86b9599a57 Merge pull request #12191 from appwrite/oauth-quality-improvements
Fix: oauth order; Fix apple secreting too much
2026-04-30 11:17:51 +02:00
Luke B. SilverandGitHub 526b390c15 Merge pull request #12189 from FerRubioMorales/fix/spanish-session-alert-translations
fix(locale): add Spanish session alert translations
2026-04-30 10:08:02 +01:00
Matej Bačo b73ba68bfb Fix oauth order; Fix apple secreting too much 2026-04-30 10:21:38 +02:00
fogelito d98bd8c972 Remove line 2026-04-30 10:44:21 +03:00
fogelito 81c580bf50 Merge branch '1.9.x' of https://github.com/appwrite/appwrite into set-global-collection 2026-04-30 10:42:09 +03:00
fogelito c0bba74eee set setGlobalCollections logs 2026-04-30 10:36:12 +03:00
frubio 337d47b1d9 fix(locale): add Spanish session alert translations 2026-04-30 09:33:08 +02:00
Jake BarnbyandClaude Opus 4.7 fba473c41a test(sqlite): skip testTimeout on SQLite adapter
SQLite has no statement-level timeout primitive, so the test's expectation
that a slow query returns 408 is not implementable on this adapter. Skip
explicitly rather than letting it surface as a failure on the SQLite matrix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 18:17:37 +12:00
Jake BarnbyandClaude Opus 4.7 d4ba685682 perf(sqlite): split each pool category into its own DB file
Previously every connection pool (console, database, documentsdb,
vectorsdb, logs) opened the same SQLite file, so they all serialised
through one writer lock — even though they're conceptually independent
databases. Treat _APP_DB_SQLITE_PATH as a directory + stem template and
replace the stem with the pool key, so each gets its own file and
unrelated writes no longer queue against each other.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 17:34:20 +12:00
Jake BarnbyandClaude Opus 4.7 68ce4dca0f chore(deps): pull SQLite BEGIN IMMEDIATE fix
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 16:34:58 +12:00
Chirag AggarwalandGitHub 8ffe48d948 Merge pull request #12179 from appwrite/fix/project-delete-platform-cleanup 2026-04-30 09:43:37 +05:30
Chirag Aggarwal 4050b9ded1 Continue project cleanup after resource failures 2026-04-30 09:28:22 +05:30
Jake BarnbyandClaude Opus 4.7 afa7ee7731 perf(sqlite): aggressive PRAGMAs and tmpfs-backed test storage
Tune SQLite for high-concurrency test workloads:
- synchronous=OFF skips fsync (safe for ephemeral test data only).
- 256 MB page cache + 2 GB mmap window cuts read I/O dramatically.
- temp_store=MEMORY keeps temporary tables off disk.
- busy_timeout to 60s and wal_autocheckpoint to every 10k pages so
  long write bursts don't fight the checkpointer.
- 64 MB WAL size cap.

Mount the SQLite docker volume as tmpfs so writes never reach disk.
The test DB is wiped between CI runs so durability is irrelevant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 15:54:20 +12:00
Jake BarnbyandClaude Opus 4.7 78cebbc3ed ci: cap paratest concurrency to 1 for SQLite
SQLite serialises writes through a single file lock. Running services
like Databases and TablesDB with paratest_processes=3 produces SQLITE_BUSY
storms — 97 lock errors in Databases and 283 in TablesDB on the prior run
even with a 30s busy_timeout. Drop concurrency to 1 for the SQLite matrix
specifically; the legacy adapter matrix keeps its existing parallelism.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 15:17:59 +12:00
Jake BarnbyandClaude Opus 4.7 50a10a3a1d chore(deps): pull SQLite FTS5 tenant-stripping fix
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 14:56:37 +12:00
Jake BarnbyandClaude Opus 4.7 314fffab81 chore(deps): pull SQLite array CONTAINS LIKE wildcard fix
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 14:44:52 +12:00
Jake BarnbyandClaude Opus 4.7 917edf920a chore(deps): pull SQLite JSON_OVERLAPS fallback fix
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 14:37:00 +12:00
Jake BarnbyandClaude Opus 4.7 43af6fa304 ci: temporarily force SQLite/shared matrix on this PR
Short-circuit the matrix script so this PR runs SQLite shared-tables only
while we drive the SQLite test suite to green. Revert this commit before
merging so the upstream branch-aware matrix logic kicks back in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 14:29:17 +12:00
Jake BarnbyandClaude Opus 4.7 895df2ca28 ci: never overlap SQLite and the legacy adapters in the matrix
Default per-PR runs target SQLite/shared only. PRs that bump
utopia-php/database swap to the legacy MariaDB/PostgreSQL/MongoDB matrix
across both modes — SQLite is excluded there since the SQLite layer is
already covered by every other PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 14:27:58 +12:00
Jake BarnbyandClaude Opus 4.7 fbff830cce ci: default matrix to SQLite shared; full non-SQLite matrix on db version change
Default per-PR runs target only SQLite shared-tables, since SQLite is the
test backend and most PRs don't touch the database adapter layer. When
utopia-php/database changes, run the full MariaDB/PostgreSQL/MongoDB
matrix across both modes to catch adapter regressions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 14:18:59 +12:00
Jake BarnbyandClaude Opus 4.7 33ca860543 ci: lock test matrix to SQLite shared-tables only
This branch is exclusively about wiring SQLite as the test backend, so
running the rest of the matrix is wasted CI. Strip databases to SQLite
and modes to shared.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 14:06:51 +12:00
Jake BarnbyandClaude Opus 4.7 f7e7c8e23f fix(sqlite): bump busy_timeout to 30s and use synchronous=NORMAL
E2E test backend was hitting SQLITE_BUSY ("database is locked") under
Swoole's concurrent worker fanout, since SQLite serialises writes through
a single file lock. The previous 5s timeout was too tight for parallel
test load. NORMAL synchronous halves write fsync cost on WAL — fine for
ephemeral test databases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 14:06:18 +12:00
Jake Barnby 9542af215e Merge remote-tracking branch 'origin/1.9.x' into feat-memory-adapter-tests
# Conflicts:
#	composer.lock
2026-04-30 13:23:49 +12:00
Jake BarnbyandClaude Opus 4.7 46357947a7 feat: enable emulateMySQL on SQLite adapter for test backend
Pulls latest utopia-php/database (e44768f) with the emulateMySQL flag and
opts SQLite into MariaDB-shape behaviour so the existing test suite, which
assumes MariaDB semantics, continues to pass against SQLite.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 13:22:08 +12:00
fogelito d099167d18 Shared env 2026-04-29 17:09:25 +03:00
fogelito 9d3255f5cd Update lock 2026-04-29 17:08:14 +03:00
fogelito f03cc847f8 Merge branch '1.9.x' of https://github.com/appwrite/appwrite into set-global-collection
# Conflicts:
#	composer.lock
2026-04-29 17:07:32 +03:00
Torsten DittmannandGitHub 6088fd55c8 Merge pull request #12138 from appwrite/feat-out-of-order-chunk-uploads 2026-04-29 18:04:57 +04:00
Matej BačoandGitHub 1aeee8c407 Merge pull request #12178 from appwrite/fix-developer-experience
Fix: Developer experiene with recent chagnes
2026-04-29 15:56:06 +02:00
Jake Barnby 7234f69738 chore(deps): point at utopia-php/database#feat-sqlite-fts for SQLite parity work
Pulls in the FTS5 fulltext implementation (utopia-php/database#870) plus
the relationship/batch-attrs/schema-introspection capability flips. Drops
the need for the Audit::setup() workarounds and the bootstrap fulltext
filter on the SQLite path — those will come out in a follow-up once CI
confirms the upstream branch is stable on its own.
2026-04-30 01:46:35 +12:00
fogelito 18b9769672 lock file 2026-04-29 16:14:21 +03:00
Jake Barnby 636ea34bdc test: update ComposeTest volume count to 8 for new appwrite-sqlite volume 2026-04-30 01:12:31 +12:00
Jake Barnby 4e5fbea62c fix: replace Audit::setup() in project create with direct createCollection
Same upstream-broken Utopia\Exception in audit's Adapter\Database::setup().
This call site fires every time a project is created, so any test that
creates projects (which is almost all of them) crashes when running
against SQLite. Mirror the http.php fix: build the audit collection
directly through the adapter's schema documents.
2026-04-30 01:05:54 +12:00
Jake BarnbyandClaude Opus 4.7 fc90b78f35 fix: filter unsupported index types in all 4 bootstrap createCollection paths
The original fulltext filter only covered the createDatabase() helper, but
http.php has three more inline createCollection paths — two for default
buckets and one for project metadata collections — each of which builds
indexes via array_map without consulting adapter capability flags. SQLite
doesn't support fulltext, so the project-collection path tripped during
EVENT_START and crashed every worker.

Extract buildSupportedIndexes() and use it from all four sites so the
filter is applied consistently. The 1-line ?? defaults on lengths/orders
match the dbForProject site's tolerance for raw config without those keys.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 01:00:11 +12:00
Jake BarnbyandClaude Opus 4.7 c9ed6c531d fix: bypass Audit::setup() so SQLite startup doesn't hit broken Utopia\Exception
utopia-php/audit's Adapter\Database::setup() calls $db->exists($db->getDatabase())
and throws Utopia\Exception on false. Two issues:
1. SQLite adapter's exists($db, null) always returns false (it has no concept
   of named databases — once the file is open, the DB exists), so the throw
   path always fires.
2. The audit lib's `use Utopia\Exception` references a class that doesn't
   exist anywhere in the dependency tree, so the throw fatals with
   `Class "Utopia\Exception" not found`.

Both are upstream bugs, but for this PR I just sidestep the broken setup()
and create the audit collection directly through the regular Database API
using the adapter's schema documents. Same end result, no exists() probe.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 00:54:07 +12:00
fogelito 8eed06678b formatting 2026-04-29 15:54:05 +03:00
Jake BarnbyandClaude Opus 4.7 efc72272e1 fix: keep DB credentials populated and skip fulltext indexes on adapters that lack support
Two fixes for the SQLite test wiring:

1. .env had emptied _APP_DB_USER/_APP_DB_PASS/_APP_DB_ROOT_PASS, but the
   mongodb/mariadb/postgresql containers still consume those during init
   regardless of which adapter Appwrite uses. Empty values left the
   side-running mongodb (needed for documentsdb) refusing to start, which
   blocked docker compose up --wait for every CI matrix row, including
   MongoDB. Restoring the original test credentials.
2. Bootstrap was unconditionally creating fulltext indexes from collection
   configs. SQLite adapter explicitly returns false for
   getSupportForFulltextIndex(), so it threw on the first such index. Now
   the bootstrap consults the adapter and skips fulltext indexes when not
   supported.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 00:48:21 +12:00