Commit graph

423 commits

Author SHA1 Message Date
Jake Barnby
7df86a3838 fix: cast attribute defaults after queue deserialization and improve test robustness
- Fix float/int/bool attribute creation failures caused by type loss
  during queue serialization in the Databases worker
- Rework session limit test to retry session creation for cache
  propagation in shared mode
- Increase GraphQL attribute polling timeouts from 30s to 60s
- Increase SchemaPolling waitForAllAttributes timeout to 180s
- Increase Realtime WebSocket client timeout from 30s to 45s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:02:23 +13:00
Jake Barnby
07dc088e4e fix: improve E2E test probes and enable function webhook events
- Fix testPasswordRecoveryUrlParams: use URL-based probes instead of
  userId-based probes to distinguish between test cases that share the
  same user
- Enable functions.* webhook events in ProjectCustom for function
  webhook tests that were silently passing by matching stale events
- Fix setupTeamMembership: add email address probe to getLastEmail to
  prevent picking up wrong invitation email
- Fix getLastEmail multi-email race: assert count inside assertEventually
  when requesting multiple emails

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:15:59 +13:00
Jake Barnby
5cb36a0a3a fix: resolve E2E test race conditions in parallel execution
- Add probe callback support to getLastEmail(), getLastEmailByAddress(),
  and getLastRequest() to filter results by content before accepting
- Fix variable name typo in TeamsCustomClientTest ($email vs $lastEmail)
- Add event probes to all 56 webhook test getLastRequest() calls to
  filter by specific event pattern (resource ID + action)
- Add email probes to Account OTP/recovery/magic-url tests to wait for
  the correct email (security phrase, Password Reset subject, etc.)
- Add email probes to Projects tests for recovery email URL matching
- Increase FunctionsSchedule future time from 1min to 2min to avoid
  timing issues when seconds are zeroed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:43:15 +13: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
Jake Barnby
bada1a7c05 Timing updates 2026-02-24 14:00:07 +13:00
Matej Bačo
f0c8f7e00e
Update tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-23 16:49:17 +01:00
Matej Bačo
f4ee6488ac Add tests for custom url schema in redirects 2026-02-23 13:09:26 +01:00
Matej Bačo
5414cc67ab Finalize html encoding rework 2026-02-23 12:54:20 +01:00
Matej Bačo
e2bc3afce6 Fix url params in redirect URLs 2026-02-20 11:15:59 +01:00
Jake Barnby
a952dad8d3 fix: add missing Role import and convert @group to PHP 8 attributes
- Add missing `use Utopia\Database\Helpers\Role` import in ProjectsBase.php
  (fixes "Class Role not found" fatal error)
- Convert @group ciIgnore docblock annotations to #[Group('ciIgnore')]
  PHP 8 attributes (PHPUnit 12 no longer supports docblock annotations)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 03:26:15 +13:00
Jake Barnby
8a6ddeef30
Merge branch '1.8.x' into feat-mongodb 2026-02-20 01:33:02 +13:00
Hemachandar
14e79f34db
Populate project-specific roles (#11209)
* Populate project-specific roles

* better comments

* simplify

* privileged user

* update permissions

* feedback

* lint

* only read + cleanup

* fix role length

* scopes

* not api-key

* cl-ignore group

* rename

* ciIgnore

* base scope

* change base scope

* fix projects

* copilot suggestion
2026-02-19 16:48:39 +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
Atharva Deosthale
c7c8349434
Merge pull request #11342 from appwrite/add-status-response
Add status to response model for projects
2026-02-17 14:02:15 +05:30
Atharva Deosthale
0844af9c9d add tests 2026-02-17 11:54:22 +05:30
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
bb26a9f583 improve devkey test for oauth 2026-02-16 17:18:58 +01:00
Matej Bačo
13edcbaf6f fix abuse test; fix mail-related tests 2026-02-16 17:06:11 +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
Jake Barnby
006867617b Fix parallel test assertions and graceful runtime cleanup
- Fix testListProjectKey: use dynamic key counts instead of hardcoded 5
  (parallel workers don't share state from testCreateProjectKey)
- Fix testGetProjectKey: expect 'Key Test' from setupProjectWithKey(),
  not 'Key Custom' from a previously-dependent test
- Handle 404 in Executor::deleteRuntime() (runtime already gone)
- Make cancel deployment cleanup best-effort (status already updated)
- Apply same fix to Sites cancel endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:23:55 +13:00
Jake Barnby
fa7ebbffa8 Fix void return in testListProjectKey and increase spatial test timeout
- Remove `return $data` from testListProjectKey() which is declared void,
  causing fatal PHP error that crashed Projects and Abuse test suites
- Increase waitForAllAttributes timeout to 10min for spatial column test
  to handle MariaDB slowness under parallel CI load

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:12:54 +13: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
Chirag Aggarwal
161b971f53 Fix oauth redirect custom scheme state 2026-02-11 10:11:04 +05:30
Matej Bačo
4df0934023 Comment fix 2026-02-10 12:01:38 +01:00
Matej Bačo
0621a32aa6 Fix tests; speed up tests; fix 5xx error 2026-02-10 11:43:22 +01:00
Matej Bačo
e1cbbe3943 Merge branch '1.8.x' into feat-list-api-keys-queries 2026-02-10 10:46:56 +01:00
Matej Bačo
226e36db95
Merge pull request #11277 from appwrite/feat-api-key-custom-id
Feat: custom ID for API keys
2026-02-10 10:46:00 +01:00
Jake Barnby
00525a5a02
Merge branch '1.8.x' into feat-db-tests 2026-02-09 22:58:10 +00:00
Matej Bačo
dafa97879c AI review fixes 2026-02-09 17:12:30 +01:00
Matej Bačo
a263afeff1 AI quality fixes 2026-02-09 17:10:00 +01:00
Matej Bačo
29915ddd3b Manual fixes of agent code 2026-02-09 16:58:44 +01:00
Matej Bačo
c0f5fa90cb Fix AI review 2026-02-09 16:53:18 +01:00
Matej Bačo
e666dc9504 AI review fixes 2026-02-09 16:42:14 +01:00
Matej Bačo
6df5556473 Implement queries param to list api keys 2026-02-09 14:58:36 +01:00
Matej Bačo
96e85c0bab AI pr review 2026-02-09 14:35:47 +01:00
Matej Bačo
40ab50ec9d formatting fix 2026-02-09 14:34:52 +01:00
Matej Bačo
9b762dde40 formatting fix 2026-02-09 14:34:36 +01:00
Matej Bačo
615aff0714 Allow custom ID for API keys 2026-02-09 14:34:05 +01:00
Matej Bačo
525b929e54 Fix implementation, add tests 2026-02-09 13:57:19 +01:00
Jake Barnby
e319feb1d4 fix: Fix relationship twoWayKey, hardcoded IDs, and datetime format issues
- Set explicit twoWayKey in testOneToOneRelationship to avoid auto-generated ID
- Replace hardcoded person10/library10/11 IDs with ID::unique() in setupOneToManyRelationship
- Fix remaining datetime format comparison in testUpdateScheduledAt
- Use assertStringContainsString for Projects mock numbers excess items test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:28:38 +13:00
Jake Barnby
1b9d0ca1c6 fix: Fix remaining parallel-safety issues from CI iteration 2
- Fix DB relationship tests: use ID::unique() for person/library collections
- Fix DB StringTypesTest: use waitForAllAttributes instead of sleep(3)
- Fix DB permissions tests: update expected counts for parallel mode
- Fix Account OAuth tests: clean up shared mock OAuth email before use
- Fix Account phone tests: ensure phone auth enabled, unique phone numbers
- Fix Messaging: compare datetime via timestamps, accept processing state
- Fix GraphQL testGetColumn: call setupStringColumn instead of setupTable
- Fix Projects: update mock numbers error message assertion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:55:41 +13:00
Matej Bačo
801707c407 Linter fix 2026-02-08 14:47:47 +01:00
Matej Bačo
94581adfcb Improve dev key tests 2026-02-08 14:44:21 +01:00
Matej Bačo
3a0dc60a4c Add test; fix implementation; pr reviews 2026-02-08 14:36:34 +01:00
Jake Barnby
0737ba1329 fix: Make more tests parallel-safe for functional mode
- Account: Use unique emails/phone numbers to avoid collisions
- Functions: Use flexible assertions for counts and search results
- GraphQL: Add better error handling and use unique IDs
- Projects: Use assertGreaterThanOrEqual for list counts
- Webhooks: Use probe to find specific delete webhook event

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:48:55 +13:00
Jake Barnby
2d160747ca perf: Remove @depends from Migrations, Projects, and Tokens tests
Added helper methods with static caching for independent test execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 12:13:54 +13:00
Jake Barnby
4a2e3b7b22
Merge branch '1.8.x' into feat-db-tests 2026-02-05 03:12:24 +00:00
Matej Bačo
ce99d80c2f ai review fixes 2026-02-04 15:09:02 +01:00
Matej Bačo
227d61e194 Support trusted console projects 2026-02-04 14:45:38 +01:00