Commit Graph
81 Commits
Author SHA1 Message Date
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 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
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 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 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 7e25b4fad9 feat: wire SQLite database adapter for tests
SQLite gives e2e tests a single shared file across all containers without
needing a heavyweight MariaDB/MongoDB/PostgreSQL service. WAL + busy_timeout
keep multi-process writers tolerable. Memory adapter was considered but its
per-process PHP arrays don't survive Swoole worker fan-out or cross-container
queue handoffs, so file-backed SQLite is the practical choice.

- registers: add 'sqlite' scheme to pool factory and worker db register,
  configured with PRAGMA journal_mode=WAL, busy_timeout=5000, foreign_keys=ON
- compose: pass _APP_DB_SQLITE_PATH and mount appwrite-sqlite:/storage/sqlite
  on every service that touches the main DB
- .env: switch _APP_DB_ADAPTER to sqlite, drop mariadb from COMPOSE_PROFILES
- ci.yml: add SQLite to the e2e matrix alongside MongoDB so each service
  is timed against both adapters in the same workflow run

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 00:41:09 +12:00
Chirag Aggarwal 360d08f087 Preserve CI image for job retries 2026-04-29 16:01:15 +05:30
Chirag Aggarwal 701f557755 ci: clean up GHCR CI image after pipeline finishes
Every CI run pushes ghcr.io/<repo>/appwrite-dev:<sha> and nothing
removes it. On an active repo with many PRs the GHCR storage grows
without bound. Add a cleanup job that runs after all consumer jobs
complete (always, even if some fail) and deletes the SHA-tagged
package version via the Packages API.

Addresses Greptile feedback on appwrite/appwrite#12176.
2026-04-29 15:23:05 +05:30
Chirag Aggarwal ec3aa2b54f ci: share docker image via GHCR instead of upload-artifact
The build job uploads the appwrite-dev image as an actions artifact
(~hundreds of MB), and 30+ E2E test jobs all pull it concurrently with
actions/download-artifact. GitHub Actions' artifact storage struggles
with that many parallel downloads and intermittently fails with
BlobNotFound or 'Artifact download failed after 5 retries'.

Push the built image to ghcr.io/<repo>/appwrite-dev:<sha> in the build
job and pull from GHCR in each test job. GHCR handles parallel image
fetches without throttling.

Mirrors appwrite-labs/cloud#3906.
2026-04-29 15:09:39 +05:30
Matej Bačo 50d86c5b5d Update ci.yml 2026-04-27 17:45:52 +02:00
Matej Bačo a588a62277 Prepare env for cicd integration with github oauth 2026-04-25 11:57:40 +02:00
Chirag Aggarwal a8e6b1b683 Merge pull request #11963 from appwrite/chore/http-benchmark-comparison 2026-04-23 09:48:37 +05:30
Chirag Aggarwal 3d66078fe9 Increase benchmark iterations 2026-04-22 19:46:27 +05:30
Chirag Aggarwal 9a6a597710 Address benchmark hardening review 2026-04-22 19:38:48 +05:30
Chirag Aggarwal c15e8d0126 Harden benchmark failure guard 2026-04-22 19:30:01 +05:30
Chirag Aggarwal 7b25d778d4 Trim benchmark scenarios 2026-04-22 19:21:51 +05:30
Chirag Aggarwal b2d24080b9 Stabilize database e2e CI retries 2026-04-22 18:08:45 +05:30
Chirag Aggarwal 0f64f54221 Harden benchmark rerun metrics 2026-04-22 15:49:27 +05:30
Chirag Aggarwal f75a7269c9 Address benchmark review simplifications 2026-04-22 15:23:35 +05:30
Chirag Aggarwal dfd39d3946 Tolerate benchmark cleanup failures 2026-04-22 14:25:59 +05:30
Chirag Aggarwal 7d7fcea8c0 Ensure benchmark failures fail CI 2026-04-22 14:16:12 +05:30
Chirag Aggarwal 73a77b8dcc Show benchmark throughput 2026-04-22 13:45:50 +05:30
Matej Bačo 0d27c59cb8 Merge branch '1.9.x' into feat-public-project-policies 2026-04-22 09:57:48 +02:00
Matej Bačo efc37c68ec Merge branch '1.9.x' into feat-project-smtp-endpoints 2026-04-22 09:50:08 +02:00
Chirag Aggarwal a98b9f2319 Handle malformed optional benchmark summaries 2026-04-22 12:06:32 +05:30
Chirag Aggarwal 3b9c604eb8 Harden benchmark comparison run 2026-04-22 09:45:51 +05:30
Chirag Aggarwal 7c486ddcef Keep benchmark comment on missing summary 2026-04-22 09:26:36 +05:30
Chirag Aggarwal cb7f2ec693 Show top benchmark request waits 2026-04-22 09:19:26 +05:30
Chirag Aggarwal 3cc7b833db Fix k6 benchmark diagnostics 2026-04-22 09:06:54 +05:30
Chirag Aggarwal 9ca84a56c9 Switch HTTP benchmark back to k6 2026-04-22 08:51:51 +05:30
Matej Bačo 06eb550e98 Finalize tests 2026-04-21 16:56:00 +02:00
Chirag Aggarwal 196b04a39c Polish benchmark comment details 2026-04-21 17:49:50 +05:30
Chirag Aggarwal b9d01617a4 Address benchmark review hardening 2026-04-21 17:24:26 +05:30
Chirag Aggarwal da4dcd8505 Merge branch '1.9.x' into chore/phpstan-level-4 2026-04-21 17:08:46 +05:30
Chirag Aggarwal 63b2a1fb7f Harden benchmark baseline reporting 2026-04-21 17:07:05 +05:30
Chirag Aggarwal 30cfbb2d99 Polish benchmark reporting 2026-04-21 16:58:31 +05:30
Chirag Aggarwal ef08d5a04c Run before benchmark with base image 2026-04-21 16:33:09 +05:30
Chirag Aggarwal 51bc3dc1d5 Migrate HTTP benchmark to PHP 2026-04-21 16:22:04 +05:30
Chirag Aggarwal 83f182b444 Address benchmark review feedback 2026-04-21 16:10:08 +05:30
Chirag Aggarwal dcd01a8fb0 Tidy benchmark PR comment 2026-04-21 16:06:30 +05:30
Chirag Aggarwal 6aeb2d2be0 Fix benchmark before branch comparison 2026-04-21 15:51:30 +05:30
Chirag Aggarwal 2cfe40e98e Compare benchmark against base branch 2026-04-21 15:11:24 +05:30
Chirag Aggarwal 15e45df81e Address HTTP benchmark review feedback 2026-04-21 15:07:20 +05:30
Chirag Aggarwal e4f74a3fb1 Run curated HTTP benchmark in CI 2026-04-21 14:56:33 +05:30
Matej Bačo ba4430801d Merge branch 'feat-project-templates-api' into feat-project-smtp-endpoints 2026-04-20 14:49:04 +02:00
Jake Barnby db3d00b1da Merge remote-tracking branch 'origin/1.9.x' into chore-remove-shared-v1 2026-04-20 18:04:26 +12:00
Chirag Aggarwal adb4e4ef36 ci: fix benchmark by pulling compose from GitHub raw for the latest tag
`https://appwrite.io/install/compose` now returns a 308 redirect to the
HTML install docs (`/docs/advanced/self-hosting/installation`) instead
of serving the compose file, so the Benchmark job's "Installing latest
version" step was downloading 0 bytes and `docker compose up -d` died
with "empty compose file". This has been failing the Benchmark job on
every recent PR, not just this one.

Resolve the latest release tag via the GitHub API, then fetch the
compose file and `.env` from `raw.githubusercontent.com` at that tag.
Switched both curl calls to `-fsSL` so they fail loudly on non-2xx
responses or redirect loss instead of silently writing empty files.
2026-04-19 20:34:51 +05:30