Commit Graph
35511 Commits
Author SHA1 Message Date
loks0nandClaude Opus 4.8 2e5a29c650 Extract request-completed/usage into its own shutdown hook; tighten cache hook
Move the RequestCompleted dispatch and usage-metrics publishing out of the
large shared shutdown hook into a dedicated Http::shutdown() hook that
injects only what it needs (request, response, project, user, usage,
publisherForUsage, authorization, bus, apiKey). Drop the now-unused
usage/publisherForUsage/bus/apiKey/authorization injections from the main
hook. Registered after the cache hook so cache writes keep happening
before usage publishing, as in the original single-hook ordering.

Also tighten the cache hook with guard clauses: hoist the cache/key/
signature setup, make the create path save-and-return explicitly instead
of relying on the empty-document signature mismatch, resolve the resource
labels lazily inside the create branch (so the param reconstruction and
label parsing only run on a cache miss, not on every cached hit), and
collapse the trailing save into the existing-entry path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 16:56:46 +01:00
loks0nandClaude Opus 4.8 c9059c75a4 Use injected 'params' directly for audit resource labels
audits.resource labels only reference URL path params (resource IDs), so
the audit code can use the injected 'params' local directly instead of
reconstructing the full resolved param set. The path+query/body+default
reconstruction now lives only in the cache hook, where the screenshot
cache.resource label genuinely needs query params.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 16:46:17 +01:00
loks0nandClaude Opus 4.8 cd0936c721 Extract response caching into its own shutdown hook
Move the cache.resource / cache.resourceType handling out of the large
shared shutdown hook into a dedicated Http::shutdown() hook in the 'api'
group. It injects only what caching needs (route, params, request,
response, project, user, dbForProject, authorization) and guards with
early returns, leaving the main hook focused on events, audit, and usage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 16:42:39 +01:00
loks0nandClaude Opus 4.8 0bf406e597 Tighten param reconstruction
Use Request::getParam() for the query/body+default fallback instead of a
cached getParams() copy, dropping the temporary and shortening the diff.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 16:18:00 +01:00
loks0nandClaude Opus 4.8 ad7a76abbb Use injected 'params' local instead of getPathValues reconstruction
The http server exposes the route's path values as an injectable 'params'
local, so inject it directly rather than rebuilding them via
Router::preparePath() + Route::getPathValues(). Query/body params and
declared defaults are still merged in to reproduce the full resolved
param set (path values take precedence), matching prior getParamsValues()
behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 16:07:27 +01:00
loks0nandClaude Opus 4.8 da8ff0f99c chore: replace deprecated Route::getParamsValues() in shared API
Reconstruct request param values from per-request sources (path values +
request params + param defaults) instead of reading the deprecated
mutable value store on the shared Route object, mirroring the
framework's own Http::getArguments() resolution precedence.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 15:50:03 +01:00
Luke B. Silver fa4de8e7ca Merge pull request #12452 from appwrite/chore/database-worker-spans
chore: trace database worker with Span::add instead of Console logging
2026-06-01 14:16:14 +01:00
loks0nandClaude Opus 4.8 fad69ebd44 chore: keep deleteByGroup best-effort, swallowing failures
Revert to the original swallow-and-continue: a failed batch delete is
recorded on the span and skipped so the remaining cleanups still run.
Drops the attemptAll helper and restores deleteCollection's sequential
calls for a minimal diff.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 14:00:08 +01:00
loks0nandClaude Opus 4.8 9036e03b40 chore: drop redundant inline comment in deleteCollection
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:54:32 +01:00
loks0nandClaude Opus 4.8 1a4f23d0ad refactor: extract attemptAll helper for collection cleanups
Replace the inline cleanup array + accumulator loop with a small
variadic attemptAll() helper, so deleteCollection reads as the intent:
run all cleanups, rethrow the first failure.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:51:05 +01:00
loks0nandClaude Opus 4.8 46b2a398ff fix: attempt all collection cleanups before failing
Dropping the deleteByGroup swallow meant a failure in the first cleanup
(related-attribute purge) skipped the attribute and index cleanups,
leaving orphaned metadata rows since the table was already dropped.

Run every cleanup in deleteCollection regardless of individual failures,
then rethrow the first error so the worker still marks the message failed
and retries the outstanding work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:49:38 +01:00
loks0nandClaude Opus 4.8 486d9271ac chore: centralize project.id span; drop superfluous worker spans
The project resource setter is the canonical owner of project.id (cloud
already adds it there for every worker span). Add it to the OSS worker
project resource too, and drop the redundant project.id from the
database worker. Also drop queue.pid/queue.name/message.timestamp:
queue.name duplicates the span action (worker.databases) and none were
part of the logging this PR replaced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:36:27 +01:00
loks0nandClaude Opus 4.8 5218fc8209 chore: drop unnecessary comment in deleteByGroup
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:30:53 +01:00
loks0nandClaude Opus 4.8 bf4d620a5c chore: let deleteByGroup failures reach the worker error handler
Previously a failed batch delete was caught and swallowed, acking the
message as if it succeeded even though the documents remained. Let the
error propagate so the worker marks the message failed and retries.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:30:10 +01:00
loks0nandClaude Opus 4.8 844d21d776 chore: record database namespace/tenant once in action
These describe the project database connection and apply to every
operation, so trace them up front in action() (from dbForProject, which
deleteByGroup always uses) rather than inside deleteByGroup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:27:40 +01:00
loks0nandClaude Opus 4.8 b3263138e8 chore: suffix delete_by_group collection span with .id
Identifiers end in .id by convention; rename delete_by_group.collection
to delete_by_group.collection.id.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:26:17 +01:00
loks0nandClaude Opus 4.8 85b5328f2e chore: always record database namespace/tenant in deleteByGroup
Namespace and tenant describe the database regardless of outcome, so
record them (along with the target collection) up front instead of only
on the error path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:24:32 +01:00
loks0nandClaude Opus 4.8 4433b10eaf chore: scope namespace/tenant spans under database
Namespace and tenant are properties of the database, so trace them as
database.namespace / database.tenant rather than under the operation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:23:17 +01:00
loks0nandClaude Opus 4.8 a5cedf4671 chore: resolve-adjacent spans and structured delete_by_group attributes
Move each Span::add next to where its value is resolved instead of
clumping them. Split the delete_by_group error string into separate
structured attributes (namespace, collection.id, tenant, error) so it
is no longer an unstructured log embedded in a span.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:18:37 +01:00
loks0nandClaude Opus 4.8 374f858db2 chore: trace database worker with Span::add instead of Console logging
Replace unstructured Console::info/error calls in the database worker
with structured Span::add tags. Operation identifiers (project, database,
collection, document) and queue metadata are recorded up front; swallowed
errors (deleteByGroup, attribute NotFound) are surfaced as spans so they
stay visible. Redundant Console::error calls before rethrows are dropped
since the entry-point harness owns span error lifecycle.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 13:14:39 +01:00
Luke B. Silver 57ef57a681 Merge pull request #12450 from appwrite/chore/revert-path-stripping
Revert template root directory path-stripping changes
2026-06-01 12:35:01 +01:00
loks0nandClaude Opus 4.7 6ed54706b3 Restore original ./ stripping for template and VCS root directories
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 12:22:59 +01:00
loks0nandClaude Opus 4.7 f22c7425f7 Revert sites test relaxation tied to template path stripping
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 12:02:02 +01:00
loks0nandClaude Opus 4.7 9ca29c17cb Revert template root directory ./ stripping
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 11:40:11 +01:00
ArnabChatterjee20k 8ac3dba7cc Merge branch '1.9.x' into appwrite-embeddings 2026-06-01 12:50:59 +05:30
ArnabChatterjee20k c79a23b037 fix: update utopia-php/agents version to 2.* in composer files 2026-06-01 11:58:39 +05:30
ArnabChatterjee20k 6d540f9b8e fix: update embedding endpoint and port in configuration 2026-06-01 11:38:58 +05:30
Matej Bačo 79ace1e60b Merge pull request #12438 from appwrite/chore-extendable-policy-tests
Chore: Improve extensibility of policies tests
2026-05-30 23:23:50 +02:00
Matej Bačo 2ae4209a99 Improve downstream tests 2026-05-30 22:52:38 +02:00
Matej Bačo 61db9a0e2a Improve extensibility of policies tests 2026-05-30 22:37:16 +02:00
Matej Bačo 6b04b916aa Merge pull request #12437 from appwrite/chore-easy-to-override-policies
Chore: Easy-to-override policies endpoints
2026-05-30 21:26:04 +02:00
Matej Bačo 8e0891c00d Make policies LIST and GET easy to override 2026-05-30 20:28:07 +02:00
Harsh Mahajan 8c9d04ecd8 Merge pull request #12429 from appwrite/fix/correct-sdk-enum-names
fix: correct prefixed SDK enum names introduced in PR #12358
2026-05-30 23:03:43 +05:30
Chirag Aggarwal 382f08f056 Merge pull request #12433 from appwrite/revert-execution-log-removal
Revert execution log removal
2026-05-30 19:34:07 +05:30
Chirag Aggarwal a080a18439 Keep benchmark health check fix 2026-05-30 18:21:00 +05:30
Chirag Aggarwal 221736694c Normalize template root directories in builds 2026-05-30 16:58:41 +05:30
Chirag Aggarwal 32c107a239 Revert execution log removal 2026-05-30 16:58:35 +05:30
Chirag Aggarwal 92ad86cf5a Merge pull request #12431 from appwrite/fix-public-hostname-swoole-dns
Fix public hostname DNS resolution in Swoole
2026-05-30 11:27:27 +05:30
Chirag Aggarwal 41660819e7 Fix public hostname DNS resolution in Swoole 2026-05-30 11:04:32 +05:30
Chirag Aggarwal 5a8947e3d8 Merge pull request #12421 from appwrite/codex/cloud-only-execution-logs
Removing execution logs
2026-05-30 07:58:21 +05:30
ArnabChatterjee20k 904661c98c Merge remote-tracking branch 'origin/appwrite-embeddings' into appwrite-embeddings 2026-05-29 18:48:19 +05:30
ArnabChatterjee20k 961d00b6a6 fix: update embedding model name to 'nomic-embed-text' in configuration and tests 2026-05-29 18:48:01 +05:30
ArnabChatterjee20k 560e5e7268 Merge branch '1.9.x' into appwrite-embeddings 2026-05-29 18:26:43 +05:30
harsh mahajan 8630d75111 fix: correct RedirectStatusCode enum name to StatusCode 2026-05-29 17:57:49 +05:30
harsh mahajan 277419962b fix: correct prefixed SDK enum names introduced in PR #12358 2026-05-29 17:48:00 +05:30
Chirag Aggarwal a027bb3a17 Merge pull request #12428 from appwrite/codex/update-domains-2-2
Update domains dependency to 2.2
2026-05-29 17:09:46 +05:30
Chirag Aggarwal 8e66970faa Update domains dependency to 2.2 2026-05-29 16:58:49 +05:30
Chirag Aggarwal 8c8f7b7c48 Normalize template root directories in builds 2026-05-29 16:40:42 +05:30
ArnabChatterjee20k 805bfd04e3 fix: handle partial success in embedding generation by filling missing results with errors 2026-05-29 16:39:39 +05:30
Chirag Aggarwal ad108b12d7 Normalize site template root directory in tests 2026-05-29 16:37:23 +05:30