Commit Graph
34674 Commits
Author SHA1 Message Date
Prem Palanisamy 2c185d1a9e refactor(realtime): split error reporting — span for per-action, logger for ad-hoc
Spans model per-action operations (open/message/close); they're a poor fit for ad-hoc
events with no operation lifecycle. Split logError to dispatch by whether a span is
active:

- Active span (realtime.open / realtime.message / realtime.close catches) -> attach
  the error to the existing span; the Sentry span exporter ships it with full operation
  context (attributes, duration, trace_id).
- No active span (pub/sub subscriber, onStart, Swoole error handler, updateWorkerDocument)
  -> push a utopia/logger Log via the realtimeLogger registry. Goes to Sentry as an event
  via the Sentry logger adapter (or to logOwl / Raygun / AppSignal). Same dedicated
  Realtime project either way.

Restores the realtimeLogger registry (dropped in the previous "spans only" pass), inlines
the now-single-caller $createLogger closure into the logger registry, and drops the
recordRealtimeErrorSpan helper — logError is the only function on this path now.

Also registers a Pretty span exporter in app/init/realtime/span.php for non-self-hosted
editions so Realtime spans are visible in the container's stdout (on self-hosted the
existing app/init/span.php already provides it; gating avoids duplicate output).
2026-05-13 09:32:21 +01:00
Prem Palanisamy f451f507f6 refactor(realtime): drop the utopia/logger error path, Sentry spans only 2026-05-12 22:06:22 +01:00
Prem Palanisamy 0a6949ff87 docs(realtime): trim comments on the Sentry span path
Collapse the multi-line doc blocks on recordRealtimeErrorSpan / pushRealtimeErrorLog /
$createLogger to one line each, drop the redundant require comment, and tighten the
"keep in sync" notes — keeping the cross-references and the double-report hazard.
2026-05-12 17:25:07 +01:00
premtsd-code ec5cfc9550 Merge branch '1.9.x' into realtime-sentry-observability 2026-05-12 16:48:24 +01:00
Prem Palanisamy cc2757ce93 refactor(registers): guard realtimeLogger early when no logging config
Return early from the realtimeLogger registry when neither
_APP_LOGGING_CONFIG_REALTIME nor _APP_LOGGING_CONFIG is set, so the no-config
case (typical self-hosted) no longer constructs and throws from new DSN(''),
and tidy the $createLogger doc comment.
2026-05-12 16:40:56 +01:00
Prem Palanisamy 5e7d88c703 refactor(registers): dedupe logger/realtimeLogger via shared $createLogger
The realtimeLogger registry was a ~40-line copy of logger; extract the
DSN -> adapter -> Logger construction into one $createLogger closure used by
both. realtimeLogger now just resolves _APP_LOGGING_CONFIG_REALTIME (falling
back to _APP_LOGGING_CONFIG), skips Sentry — those errors go out as spans via
app/init/realtime/span.php — and delegates the rest. Cross-referenced the two
"sentry" conditions in both files. No behavior change (legacy ;-delimited
config no longer crashes the realtime registry; it disables logging like the
main one).
2026-05-12 16:30:34 +01:00
Prem Palanisamy 88225dba6d refactor(realtime): trim comments on Sentry span exporter path 2026-05-12 16:15:33 +01:00
Matej Bačo 7421b29c45 Merge pull request #12292 from appwrite/fix-locale-tests
Fix: avatars tests
2026-05-12 16:53:31 +02:00
Prem Palanisamy 88e4230d39 refactor(realtime): extract Sentry span exporter init, split logError
Move the Realtime Sentry span exporter registration out of app/realtime.php
into app/init/realtime/span.php (mirrors app/init/span.php / app/init/realtime/
connection.php), and split the now-80-line logError() into recordRealtimeErrorSpan()
(span path) and pushRealtimeErrorLog() (legacy utopia/logger path, non-Sentry
providers only), leaving logError() a small orchestrator. No behavior change.
2026-05-12 15:41:10 +01:00
Matej Bačo af0c41dcf5 Fix avatars tests 2026-05-12 16:08:58 +02:00
premtsd-code 1f9a104ea3 Merge branch '1.9.x' into realtime-sentry-observability 2026-05-12 14:14:18 +01:00
Prem Palanisamy 9b8e9f55c8 feat(realtime): export realtime errors as spans to a dedicated Sentry project
Realtime errors are now recorded onto a span and shipped to a Sentry
project configured via _APP_LOGGING_CONFIG_REALTIME (falls back to
_APP_LOGGING_CONFIG). The Sentry span exporter is registered in
app/realtime.php so it does not affect the HTTP/worker/CLI span
exporters. logError() attaches the error to the active span, or opens a
short-lived realtime.error span for call sites without one (pub/sub
subscriber, onStart, the Swoole error handler), and keeps the legacy
utopia/logger push only for non-Sentry providers; the realtimeLogger
registry now returns null when the provider is Sentry to avoid
double-reporting. Documents _APP_LOGGING_CONFIG_REALTIME.
2026-05-12 14:10:22 +01:00
Jake Barnby 8c8a56ed43 Merge pull request #12273 from appwrite/refactor-target-fetch
fix(messaging): remove redundant user fetch
2026-05-13 01:00:26 +12:00
Matej Bačo 99fad4dca2 Merge pull request #12290 from appwrite/fix-sdk-generator-for-response-enums
Fix: Project SDK enum names
2026-05-12 14:55:48 +02:00
Matej Bačo b655f24172 Fix warning 2026-05-12 14:49:59 +02:00
Matej Bačo 5a748c2783 PR review fixes 2026-05-12 14:46:33 +02:00
Jake Barnby 87e93c9ff5 Merge pull request #12289 from appwrite/fix/tablesdb-runner-family
chore: pin TablesDB e2e to 8cpu runner
2026-05-13 00:42:36 +12:00
Matej Bačo 0ca52a1bdb Request enum params sdk method name 2026-05-12 14:39:13 +02:00
Jake Barnby a0ecffe961 chore: pin TablesDB e2e to 8cpu runner
After family=m7 was removed from the default e2e_service runner in #12274,
TablesDB inherits the bare 4cpu runner with no instance-family pinning. Under
paratest_processes: 3 the databases worker can't create attributes fast enough
for the polling loop, producing "Expected 'available', Actual 'processing'"
flakes across unrelated PRs. Match the Databases service override to give
TablesDB its own 8cpu runner.
2026-05-13 00:24:21 +12:00
Matej Bačo 17e9c313f0 Fix response format enum sdk names 2026-05-12 14:17:31 +02:00
Matej Bačo 5e1439f64e Merge pull request #12276 from appwrite/feat-rework-project-response-model
Feat: Rework project response model
2026-05-12 12:57:16 +02:00
Matej Bačo 930c23d7e3 Harden backwards compatibility attributes 2026-05-12 12:27:06 +02:00
Matej Bačo 548077f01e Fix flaky test 2026-05-12 11:27:24 +02:00
Matej Bačo bbd24e5029 Merge pull request #12285 from appwrite/fix-schedule-doc-missing
Fix: scheduler doc missing for functions
2026-05-12 11:26:13 +02:00
Matej Bačo 8bef181ad8 Fix scheduler doc missing for functions 2026-05-12 10:44:16 +02:00
Matej Bačo ff92fd229b Revert "Fix function scheduler document missing"
This reverts commit 5ef5ead98f.
2026-05-12 10:43:11 +02:00
Matej Bačo 5ef5ead98f Fix function scheduler document missing 2026-05-12 10:42:56 +02:00
Atharva Deosthale 668b61e620 Merge pull request #12279 from appwrite/fix-codex-plugin
fix codex plugin
2026-05-12 12:29:06 +05:30
Jake Barnby ea28f12fb4 Merge pull request #12280 from appwrite/fix-migration-stuck-on-early-failure
fix(migrations): write _APP_MIGRATION_HOST in the installer-generated .env
2026-05-12 17:08:45 +12:00
Damodar Lohani 45298f8e23 Merge pull request #12282 from appwrite/CLO-4320-fix-project-delete-event
Fix: remove invalid event label from project delete action
2026-05-12 10:47:33 +05:45
Damodar Lohani 0e87d0b483 fix: remove invalid event label from project delete action
Event::generateEvents() rejects the pattern 'project.delete' because
it parses 'delete' as a resource that must be present in route params.
The pre-migration route did not declare an event label, so functions
and webhooks were never triggered on project deletion. Restore that
behavior by removing the label.
2026-05-12 04:50:58 +00:00
Chirag Aggarwal fde30794ec Merge pull request #12246 from appwrite/refactor/mails-messaging-publishers
Migrate mails and messaging queues to publishers
2026-05-12 09:58:56 +05:30
premtsd-code 1f5ee53f3a Merge branch '1.9.x' into fix-migration-stuck-on-early-failure 2026-05-11 21:29:40 +01:00
Prem Palanisamy 3721e6b950 fix(migrations): write _APP_MIGRATION_HOST in generated .env (install & upgrade)
The migrations worker (Appwrite→Appwrite migrations + CSV/JSON imports
& exports) reads `_APP_MIGRATION_HOST` to call back into this instance's
API. `_APP_MIGRATION_HOST` was introduced in #11229 (1.8.x / 1.9.x) but
was never added to `app/config/variables.php`, so `appwrite install` /
`appwrite upgrade` never write it into the generated `.env`. With the
var unset, the migrations worker fails — on a fresh self-hosted install
the first export hangs with no error (#11853). (Contributors and CI
don't hit it because the repo's hand-maintained `.env` already has
`_APP_MIGRATION_HOST=appwrite`; only the *installer-generated* `.env` is
missing it.)

Add `_APP_MIGRATION_HOST` to `app/config/variables.php` with default
`appwrite` — the API service name in the standard Docker Compose setup,
which is what the repo's own `.env` and the cloud Helm charts already
use, and what the migration endpoint was hardcoded to before #11229.
`appwrite install` and `appwrite upgrade` now write it into the
generated `.env`, so fresh installs and upgrades have it set and the
migration/import/export flows work.

Scope: this PR fixes the install & upgrade paths only — it deliberately
doesn't change the worker code.

Fixes #11853
2026-05-11 21:26:26 +01:00
Levi van Noort 103e219675 Merge pull request #12274 from appwrite/migrate-away-from-blacksmith-based-runners
refactor: enhance execution log checks in SitesCustomServerTest
2026-05-11 21:35:42 +02:00
Matej Bačo da3a3b939a Finalize PR 2026-05-11 20:22:50 +02:00
Levi van Noort 994a4e0fc7 chore: remove 'family=m7' from e2e_service runner configuration 2026-05-11 20:11:08 +02:00
Matej Bačo 36dec7c88f Fix more tests 2026-05-11 19:47:57 +02:00
Matej Bačo 5eb4c6b310 Fix tests 2026-05-11 18:38:30 +02:00
Matej Bačo 152b45087e Fix more tests 2026-05-11 17:01:00 +02:00
Levi van Noort 5fba2889cb chore: update e2e_service runner configuration to use m7 family 2026-05-11 16:58:36 +02:00
Levi van Noort 9b4f8d7ac0 Merge branch '1.9.x' into migrate-away-from-blacksmith-based-runners 2026-05-11 16:16:55 +02:00
Atharva Deosthale 9056de0103 fix codex plugin 2026-05-11 19:38:06 +05:30
Matej Bačo 6cbf080156 Fix code quality 2026-05-11 16:04:39 +02:00
Matej Bačo 89ec639f87 Fix startup issues 2026-05-11 15:55:53 +02:00
Matej Bačo 870fe72bf6 Fix response filter 2026-05-11 15:40:45 +02:00
Matej Bačo 5cd737b901 Backwards compatibility for GET /v1/project 2026-05-11 15:08:15 +02:00
Chirag Aggarwal cf1bb1a1cc build 2026-05-11 17:59:43 +05:30
Chirag Aggarwal 330b11a64b Merge branch '1.9.x' into refactor/mails-messaging-publishers 2026-05-11 17:43:48 +05:30
Jake Barnby 4e73559eb7 Merge branch '1.9.x' into refactor-target-fetch 2026-05-11 23:31:18 +12:00