Commit Graph

1391 Commits

Author SHA1 Message Date
ArnabChatterjee20k 5405ecab36 updated db 2026-03-18 20:28:18 +05:30
ArnabChatterjee20k f02a36f998 revert db 2026-03-18 19:49:00 +05:30
Jake Barnby e6272f7a35 fix: update utopia-php/database to fix shared tables collection recreation
Points to fix-collection-recreate branch which prevents the orphan
reconciliation logic from dropping and recreating shared physical tables
when a new tenant creates collections. In shared-tables mode, a
DuplicateException from the adapter means the table is shared with other
tenants, not an orphan from a partial failure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 00:58:44 +13:00
Jake Barnby 176a29d608 Remove redundant dep 2026-03-16 21:42:37 +13:00
Jake Barnby ee732581d8 Update DB 2026-03-16 21:40:06 +13:00
Jake Barnby a94649fb58 Merge remote-tracking branch 'origin/1.8.x' into feat-installer
# Conflicts:
#	composer.json
#	composer.lock
2026-03-16 21:25:10 +13:00
loks0n a86217bf4b chore: remove phpbench dependency and benchmark files
phpbench pulled in doctrine/annotations which has a security advisory.
The bench script and its only benchmark file are unused in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 18:48:24 +00:00
loks0n 937d94972f ci: upgrade PHPStan to v2 with baseline and full codebase coverage
- Upgrade phpstan/phpstan from 1.12.* to ^2.0
- Raise analysis level to max
- Expand paths from 3 specific dirs to src/, app/, bin/, tests/
- Generate baseline capturing 95,365 existing errors for incremental adoption
- Rename composer script from `check` to `analyze`
- Add --memory-limit=1G to handle larger scan scope

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 17:49:49 +00: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
loks0n 236dceae2c Pin utopia-php/servers to 0.2.5
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 13:59:06 +00:00
Jake Barnby 03ebc4857a fix: pin utopia-php/di and servers to prevent breaking upgrades
The composer update pulled in utopia-php/di 0.3.1 which removed the
Dependency class, causing fatal errors. Pin to 0.1.0 and servers 0.2.5.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 00:49:31 +13:00
Jake Barnby 99f08b9f95 fix: update utopia-php/database to 5.3.11 and utopia-php/mongo to 1.*
Use released versions instead of dev branches:
- database 5.3.11: $tenant type VAR_INTEGER -> VAR_ID for MongoDB compatibility
- mongo 1.0.1: collection exists exception uses error code 48

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 00:17:34 +13:00
Jake Barnby cdbb8ff7e4 fix: use mongo library branch with collection exists error code fix
Adds utopia-php/mongo dev-fix-collection-exists-code which sets error
code 48 (NamespaceExists) when createCollection detects the collection
already exists. This allows the database adapter to handle it as a
DuplicateException and return true, fixing shared tables mode where
collections like _audit are shared across projects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:20:06 +13:00
Jake Barnby 99f21b8af6 fix: use database library fix-mongo-perms branch for VAR_ID tenant type
Updates utopia-php/database to dev-fix-mongo-perms which changes the
$tenant internal attribute type from VAR_INTEGER to VAR_ID, fixing
MongoDB shared tables where tenant values are UUID7 strings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:04:42 +13:00
Jake Barnby aa1012ffb6 Merge remote-tracking branch 'origin/1.8.x' into feat-installer
# Conflicts:
#	.github/workflows/tests.yml
#	composer.lock
2026-03-13 14:47:30 +13:00
Prem Palanisamy 0ebda89adf update utopia-php/database to released 5.3.8 2026-03-11 05:56:44 +00:00
Prem Palanisamy 1be142e4be test: use database fix branch for preserveDates datetime format 2026-03-10 12:33:30 +00:00
Prem Palanisamy ee2e41fa45 feat: add messaging resource migration support 2026-03-10 09:48:45 +00:00
Jake Barnby 06e3e98cec Merge branch '1.8.x' into feat-installer 2026-03-10 15:07:42 +13:00
Chirag Aggarwal 198f9a64a3 refactoring 2026-03-04 19:03:21 +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 3ecb4ee4e2 Sync 1.8.x 2026-02-26 18:50:29 +13:00
Hemachandar cfddef3706 Upgrade utopia-php/vcs (#11401)
* Upgrade `utopia-php/vcs`

* fix

* bump
2026-02-25 19:54:04 +05:30
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
Chirag Aggarwal f9d6594955 composer 2026-02-23 17:43:11 +05:30
Chirag Aggarwal 619fe72693 use diff check 2026-02-20 16:05:36 +05:30
Chirag Aggarwal fe48882e6c feat(sdks): automate sdk version/changelog with assistant 2026-02-19 15:39:11 +05:30
Jake Barnby 64a368ba3d Merge remote-tracking branch 'origin/feat-db-tests' into feat-mongodb
# Conflicts:
#	.github/workflows/tests.yml
#	src/Appwrite/Utopia/Response.php
#	src/Appwrite/Utopia/Response/Model/AttributeList.php
#	tests/e2e/Client.php
#	tests/e2e/Scopes/ProjectCustom.php
#	tests/e2e/Services/Databases/DatabasesBase.php
#	tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php
#	tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php
#	tests/e2e/Services/Databases/Legacy/DatabasesStringTypesTest.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesBase.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesCustomClientTest.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesCustomServerTest.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesStringTypesTest.php
#	tests/e2e/Services/Databases/Transactions/TransactionsBase.php
#	tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php
#	tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php
#	tests/e2e/Services/Messaging/MessagingBase.php
#	tests/e2e/Services/Sites/SitesBase.php
#	tests/e2e/Services/Sites/SitesCustomServerTest.php
2026-02-18 03:27:23 +13:00
Jake Barnby 51af714ea8 Merge branch '1.8.x' into feat-mongodb 2026-02-17 08:38:34 +00:00
Chirag Aggarwal 8639e70ce9 use stable 2026-02-17 11:25:27 +05:30
Chirag Aggarwal cc0d63bf03 chore: bump storage lib to remove deprecation warnings 2026-02-17 10:55:37 +05:30
Jake Barnby 1740ce59c0 Merge branch '1.8.x' into feat-mongodb 2026-02-16 13:16:45 +00:00
fogelito cd3dc0c4e4 Update migrations 2026-02-16 12:03:10 +02:00
fogelito 4b705d5505 lock 2026-02-15 15:21:05 +02:00
fogelito d754b8a561 lock 2026-02-15 13:44:13 +02:00
fogelito 3a07a4b133 attributes types 2026-02-15 13:40:42 +02:00
Jake Barnby caafe2678b Merge branch '1.8.x' into feat-mongodb 2026-02-14 04:50:00 +00:00
loks0n a44a22ce04 Update utopia-php/span to 1.1.* with pretty exporter and instrument HTTP lifecycle
- Add utopia-php/span 1.1.* direct dependency, bump utopia-php/dns to 1.6.*
- Create shared app/init/span.php for span storage and pretty exporter setup
- Instrument HTTP request lifecycle with spans (method, path, response code)
- Add database.setup and http.server.start spans
- Replace old Console error logs with Span::error() in general controller

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 13:56:59 +00:00
Jake Barnby 7708f13ebd fix: revert database package, add debug output for $sequence query failures
- Revert utopia-php/database to 5.1.2 (the Sequence validator fix
  incorrectly assumed $sequence is always integer, but on MongoDB
  internal collections it uses UUID7)
- Revert Base.php change
- Add detailed error messages to testGetDocumentWithQueries and
  testGetRowWithQueries to capture actual $sequence values and API
  error responses for debugging
- Keep Messaging scheduledAt fix (30s initial, 15s rescheduled)
- Keep Functions auth retry improvement (10 retries with project refresh)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 00:09:31 +13:00
Jake Barnby f7ba5e39b7 fix: update Sequence validator, fix messaging race condition, improve auth retry
- Update utopia-php/database to fix Sequence validator rejecting integer
  $sequence values on MongoDB (VAR_UUID7) adapters
- Fix Base.php Filter constructor passing APP_DATABASE_QUERY_MAX_VALUES
  as $idAttributeType instead of the correct Database::VAR_INTEGER
- Fix Messaging testUpdateScheduledAt race condition by increasing
  initial scheduledAt from 3s to 30s so scheduler doesn't fire before
  the PATCH update processes
- Improve Functions callWithAuthRetry to refresh project credentials
  after 4 consecutive 401 failures and increase max retries to 10

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 23:54:39 +13:00
Jake Barnby b41678d57a Merge remote-tracking branch 'origin/feat-mongodb' into feat-installer
# Conflicts:
#	.github/workflows/tests.yml
#	Dockerfile
#	app/views/install/compose.phtml
#	composer.lock
#	mongo-entrypoint.sh
#	src/Appwrite/Platform/Tasks/Install.php
#	src/Appwrite/Platform/Tasks/Upgrade.php
#	tests/e2e/Client.php
#	tests/e2e/Services/Databases/DatabasesBase.php
#	tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php
#	tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesBase.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesCustomClientTest.php
#	tests/e2e/Services/Databases/TablesDB/DatabasesCustomServerTest.php
#	tests/e2e/Services/Databases/Transactions/TransactionsBase.php
#	tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php
#	tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php
#	tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
#	tests/e2e/Services/Teams/TeamsCustomClientTest.php
2026-02-13 17:09:42 +13:00
Jake Barnby 75ac4e4447 Merge branch '1.8.x' into feat-db-tests 2026-02-13 04:00:43 +00:00
Jake Barnby 2b536078bb Merge branch '1.8.x' into feat-mongodb 2026-02-13 02:19:37 +00:00
loks0n 78e63085cf Update PHPStan 1.8→1.12, pin composer images to 2.8
PHPStan 1.8 triggers deprecation warnings on the PHP version shipped
with composer:2.8. Upgrading to 1.12 resolves the compatibility issue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 01:16:35 +00: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
Jake Barnby 408f65bf64 Merge branch '1.8.x' into feat-db-tests 2026-02-12 09:14:57 +00:00
Jake Barnby 7d5f6c9bf3 Merge remote-tracking branch 'origin/1.8.x' into feat-db-tests
# Conflicts:
#	.github/workflows/tests.yml
#	composer.lock
#	tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
#	tests/e2e/Services/Teams/TeamsCustomClientTest.php
2026-02-12 12:34:42 +13:00
Jake Barnby ce4e99d643 Merge remote-tracking branch 'origin/1.8.x' into feat-update-base
# Conflicts:
#	composer.json
2026-02-12 12:20:04 +13:00
Chirag Aggarwal 61c5374134 remove orchestration 2026-02-11 16:04:20 +05:30