Commit Graph

262 Commits

Author SHA1 Message Date
Matej Bačo 6f8a54273d AI review fixes 2026-03-19 11:47:02 +01:00
Matej Bačo 37a7c70c2b Fix webhook endpoints duplication 2026-03-19 11:27:13 +01:00
Jake Barnby 09c963abda fix: use $sequence for team lookup instead of $internalId
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 10:51:18 +13:00
Jake Barnby eb2f0b1cea fix: restore team lookup by $internalId and remove duplicate composer key
The team resource query was changed from $internalId to $sequence,
breaking console session authentication (401 on project creation).
Also removed duplicate utopia-php/servers entry in composer.json
and updated composer.lock hash.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 10:40:29 +13:00
Jake Barnby 01a9340eaf Merge branch '1.8.x' into feat-installer 2026-03-14 10:30:29 +13:00
Jake Barnby 6fee0cb73e Revert "fix: cast tenant to int for SQL adapters to fix strict type comparison"
This reverts commit 840b1fbef3.
2026-03-14 01:16:14 +13:00
Jake Barnby 840b1fbef3 fix: cast tenant to int for SQL adapters to fix strict type comparison
Document::getTenant() casts numeric tenants to (int), but
adapter->getTenant() held a string from getSequence(). The strict
!== comparison in Database::getCollection() then failed, returning
"Collection not found" for all shared-table MariaDB projects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 01:06:43 +13:00
Jake Barnby 871795efa9 fix: remove conditional tenant int cast, use string tenant directly
The $tenant attribute type in the database library is being changed from
VAR_INTEGER to VAR_ID, which handles both SQL (integer) and MongoDB
(UUID7 string) adapters natively. This removes the now-unnecessary
conditional casting pattern throughout the codebase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 19:53:42 +13:00
Jake Barnby d91e3543c8 (fix): use adapter ID type to determine tenant value for MongoDB compatibility 2026-03-13 19:13:07 +13:00
loks0n a804cba999 Refactor usage metrics to stateless publisher pattern
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:36:16 +00:00
Chirag Aggarwal 8b026d3459 perf: optimize updateDocument() calls to use sparse documents
Optimize updateDocument() calls across the codebase to pass only changed
attributes as sparse Document objects rather than full documents. This is
more efficient because updateDocument() internally performs array_merge().

Changes:
- Updated 58 files to use sparse Document objects
- Added Performance Patterns section to AGENTS.md with optimization guidelines
- Applied pattern to Workers, Functions, Sites, Teams, VCS modules
- Updated app/controllers/api files (account, users, messaging)
- Updated app infrastructure files (realtime, general, init/resources, shared/api)

Exceptions maintained:
- Migration files (need full document updates by design)
- Cases with 6+ attributes (marginal benefit)
- Complex nested relationship logic
2026-03-06 17:05:19 +05:30
loks0n b45ff6b646 refactor: replace queueForExecutions with Bus event bus
Introduce a generic event bus (Utopia\Bus) with typed events, listener
base class, Span instrumentation, and coroutine dispatch. Replace all
direct queueForExecutions and inline execution usage calls with
ExecutionCompleted event and dedicated listeners (Log, Usage).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 19:36:48 +00:00
Jake Barnby 1cb7c4b3f6 Merge remote-tracking branch 'origin/1.8.x' into feat-mongodb
# Conflicts:
#	.gitignore
#	composer.lock
#	tests/e2e/Services/Teams/TeamsCustomClientTest.php
2026-02-24 14:06:57 +13:00
Matej Bačo f8783faf1e Merge branch '1.8.x' into fix-email-url-params-encoding 2026-02-23 16:52:32 +01:00
Matej Bačo f4ee6488ac Add tests for custom url schema in redirects 2026-02-23 13:09:26 +01:00
Jake Barnby 0019f01492 Merge branch '1.8.x' into feat-mongodb 2026-02-23 21:21:26 +13:00
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
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
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
Jake Barnby 51af714ea8 Merge branch '1.8.x' into feat-mongodb 2026-02-17 08:38:34 +00:00
Damodar Lohani ee9850b642 Merge pull request #11282 from appwrite/chore-tests
Chore: tests
2026-02-17 12:43:08 +05:45
Jake Barnby 459a5617d6 Merge remote-tracking branch 'origin/1.8.x' into feat-mongodb 2026-02-17 16:32:46 +13:00
Matej Bačo c7bbf6a987 fix org keys auth 2026-02-16 16:14:43 +01:00
Jake Barnby 5590f0bcd0 Merge remote-tracking branch 'origin/1.8.x' into feat-mongodb
# Conflicts:
#	.env
#	.github/workflows/tests.yml
#	app/controllers/api/projects.php
#	app/controllers/api/teams.php
#	app/init/registers.php
#	app/views/install/compose.phtml
#	composer.json
#	composer.lock
#	docker-compose.yml
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Create.php
#	src/Appwrite/Platform/Tasks/Install.php
#	src/Appwrite/Platform/Tasks/Upgrade.php
#	tests/e2e/Services/Databases/Legacy/DatabasesBase.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesBase.php
2026-02-12 23:35:21 +13:00
Damodar Lohani 565237df7d Merge remote-tracking branch 'origin/1.8.x' into chore-tests 2026-02-11 13:34:31 +00:00
Chirag Aggarwal 45f4b1e8ad Merge branch '1.8.x' into fix/cli-static-setresource 2026-02-11 16:04:14 +05:30
Jake Barnby 2d76fcced1 Merge pull request #11272 from appwrite/realtime-query-reserved-channels 2026-02-11 07:09:28 +00:00
Chirag Aggarwal b2f4c4227e Merge branch '1.8.x' into fix/cli-static-setresource 2026-02-11 12:10:35 +05:30
Damodar Lohani bb76becf81 Add CORS configuration and refactor CORS resource handling 2026-02-10 10:52:53 +00:00
Chirag Aggarwal 2d05d608f4 Upgrade utopia-php dependencies and fix namespace changes
- Upgrade utopia-php/cli from 0.15 to 0.22
- Upgrade utopia-php/analytics from 0.10 to 0.15
- Upgrade utopia-php/orchestration from 0.9 to 0.19
- Use dev branches for utopia-php/framework and utopia-php/platform
- Remove utopia-php/swoole dependency (merged into framework)
- Migrate Utopia\CLI\Console to Utopia\Console across all files
- Migrate Utopia\Http to Utopia\Http\Http namespace
- Migrate Utopia\Swoole\Files to Utopia\Http\Files (now instance-based)
- Convert static CLI::setResource() calls to instance-based Dependency API
- Fix StatsResources task named parameter mismatch
2026-02-10 10:34:24 +05:30
loks0n b432918385 feat: worker executions 2026-02-09 20:20:44 +00:00
ArnabChatterjee20k 81f4d10ad6 Enhance Realtime channel handling for project queries and improve test coverage 2026-02-09 11:48:04 +05:30
Matej Bačo fd323feae8 Simplify diff 2026-02-08 14:37:35 +01:00
Matej Bačo 3a0dc60a4c Add test; fix implementation; pr reviews 2026-02-08 14:36:34 +01:00
Matej Bačo bed46a6bef Fix redirect url approval for oauth flow 2026-02-08 14:12:23 +01:00
Matej Bačo a860975b0e update docs 2026-02-04 15:23:10 +01:00
Matej Bačo 227d61e194 Support trusted console projects 2026-02-04 14:45:38 +01:00
Jake Barnby e70739a3c0 Merge remote-tracking branch 'origin/1.8.x' into feat-mongodb
# Conflicts:
#	Dockerfile
#	app/controllers/api/account.php
#	app/controllers/api/avatars.php
#	app/controllers/api/console.php
#	app/controllers/api/projects.php
#	app/controllers/api/storage.php
#	app/controllers/api/teams.php
#	app/http.php
#	app/init/database/filters.php
#	app/init/registers.php
#	app/init/resources.php
#	app/views/install/compose.phtml
#	composer.json
#	composer.lock
#	docker-compose.yml
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Update.php
#	src/Appwrite/Platform/Modules/Functions/Http/Deployments/XList.php
#	src/Appwrite/Platform/Tasks/Install.php
#	tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
2026-02-05 01:01:03 +13:00
Chirag Aggarwal 1eaf5d5ffa replace app usage with http 2026-02-04 11:22:04 +05:30
Matej Bačo 8e98c08a23 Fix failing tests 2026-01-21 16:05:43 +01:00
Matej Bačo e5ed7c835a Merge branch '1.8.x' into chore-php-types 2026-01-21 14:43:22 +01:00
shimon c3ea66b37a Merge branch '1.8.x' of github.com:appwrite/appwrite into add-webhooks-and-functions-events
# Conflicts:
#	app/controllers/shared/api.php
#	app/init/resources.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php
#	src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php
#	src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Transactions/Update.php
2026-01-18 11:01:40 +02:00
Darshan c67b77bca0 update: implement proper logs cleanup! 2026-01-16 15:06:35 +05:30
Matej Bačo 5d5a14bd77 PR review fixes 2026-01-15 16:16:09 +01:00
Matej Bačo 1308706023 Merge branch '1.8.x' into chore-php-types 2026-01-15 15:52:51 +01:00
Jake Barnby b1171c661e Add setDatabase() to all project database instances
This completes the fix for utopia-php/database 4.5.2 which removed
the automatic USE database statement. All Database instances that
create or query project databases now have explicit setDatabase()
calls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 19:08:25 +13:00
Jake Barnby 728ed57df0 Fix database initialization after utopia-php/database 4.5.2 update
The 4.5.2 update removed the automatic USE database statement on init,
requiring explicit setDatabase() calls on all database resources.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 18:43:28 +13:00
Jake Barnby 2cfb5ecfd9 Reapply "Merge pull request #11130 from appwrite/feat-auth-instance"
This reverts commit 38687bc24e.
2026-01-15 04:08:00 +13:00
Jake Barnby 38687bc24e Revert "Merge pull request #11130 from appwrite/feat-auth-instance"
This reverts commit c12cad80bb, reversing
changes made to 2a17429226.

# Conflicts:
#	composer.lock
2026-01-15 03:48:42 +13:00