Commit Graph

5547 Commits

Author SHA1 Message Date
Damodar Lohani f8fb2e8c2d Chore: test group 2026-02-10 00:01:40 +00:00
Jake Barnby 50193ebeeb Merge branch '1.8.x' into feat-update-base 2026-02-09 23:31:00 +00:00
Jake Barnby 00525a5a02 Merge branch '1.8.x' into feat-db-tests 2026-02-09 22:58:10 +00:00
loks0n b432918385 feat: worker executions 2026-02-09 20:20:44 +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
Matej Bačo 074ffad826 Improve origin unit tests 2026-02-09 13:46:15 +01:00
Jake Barnby 39b6aad959 fix: Use 'columns' instead of 'attributes' for TablesDB index creation
The TablesDB index creation API requires 'columns' parameter, not
'attributes' (which is the collections API parameter). This caused
testDeleteIndexTablesAPI to always fail because the index was never
actually created.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 22:11:18 +13:00
Jake Barnby 7bfae7c2c3 fix: Add diagnostic assertions to Realtime test helpers
Add response status checks on all creation calls (database, table,
column, index) to catch silent failures early and provide diagnostic
info instead of mysterious 404s during polling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:26:16 +13:00
Jake Barnby 4412be13f0 fix: Increase Proxy deployment activation timeout from 100s to 200s
Same issue as Sites - under CI parallel load the deployment builds
successfully but activation propagation takes longer than 100s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:03:56 +13:00
Jake Barnby b597fb9956 fix: Replace sleep(5) with proper polling and increase timeouts in Realtime tests
The Realtime test helpers used fragile sleep(5) for attribute/index
creation and had short polling timeouts (30s/60s) that fail under CI
parallel load. Replaced with assertEventually polling and increased
all timeouts to 120s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 20:42:15 +13:00
ArnabChatterjee20k 4b3c4323ee Enhance reserved parameter handling in Realtime adapter and update related tests 2026-02-09 13:07:11 +05:30
Jake Barnby 6a1fa1d608 fix: Increase schema polling timeouts from 3min to 5min for CI stability
Under parallel load in CI, attribute/index workers can take longer than
3 minutes to process. Increase all polling timeouts to 5 minutes to
reduce flaky failures from worker queue congestion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:54:01 +13:00
ArnabChatterjee20k ecea1a580d updated channels 2026-02-09 12:02:01 +05:30
ArnabChatterjee20k 842c274d02 updated tests 2026-02-09 11:55:39 +05:30
ArnabChatterjee20k 81f4d10ad6 Enhance Realtime channel handling for project queries and improve test coverage 2026-02-09 11:48:04 +05:30
Jake Barnby 2a41fc6f23 fix: Move server-side check before setupCollection in testConsoleProject
Prevents risky test warning where setupCollection makes assertions
before expectNotToPerformAssertions is called for server-side tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:15:35 +13:00
Jake Barnby a55a784f07 fix: Use fresh magic URL token in testCreateSessionWithMagicUrl
The cached token from setupMagicUrl may have been consumed by
setupMagicUrlSession in a previous test method in the same process,
causing a 401 when the test tries to create a session with it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 18:20:36 +13:00
Jake Barnby 64d6efd098 fix: Add missing attribute types to Collection/AttributeList models and fix parallel test issues
- Add MODEL_ATTRIBUTE_VARCHAR/TEXT/MEDIUMTEXT/LONGTEXT to Collection and
  AttributeList models, fixing TypeError in Response::hasModel() that
  caused 4974 server crashes when serializing collections with new
  string attribute types
- Initialize $ruleType to null in Response::output() to prevent
  undefined variable when no model condition matches
- Isolate testUniqueIndexDuplicate with its own collection to prevent
  duplicate title interference from parallel tests in the same process
- Add retry mechanism to phone session creation for OTP token issues
- Increase GraphQL function build timeout from 30s to 120s
- Increase Sites deployment activation timeout from 100s to 200s
- Relax GraphQL bulk update row count assertion for parallel safety

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:53:21 +13:00
Jake Barnby b3eecac6f9 fix: Add error details to assertions and handle 409 in relationship setup
- Add response body to assertion messages for debugging 400/409 errors
- Re-add 409 handling for relationship creation (race condition in parallel mode)
- Use explicit fullName: null instead of empty data for null person documents

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:56:08 +13:00
Jake Barnby d617f89642 fix: Fix parallel test failures across Databases, GraphQL, Realtime, and Account
- DatabasesBase: Wait for twoWayKey attribute on library collection in
  setupOneToManyRelationship; use server API key headers for document creation
- DatabasesStringTypesTest: Add delays between attribute creation batches to
  avoid overwhelming the database worker
- SchemaPolling: Improve waitForAllAttributes error messaging
- GraphQL UsersTest: Use fresh user in testDeleteUserSession to avoid
  session conflicts
- Realtime: Increase WebSocket timeout to 120s and index polling to 60s
- Account: Add better error reporting for phone session creation failures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:08:55 +13: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
Jake Barnby 161e4e53d4 fix: Address remaining parallel-safety failures across all test suites
- Fix Legacy DatabasesStringTypesTest with project-keyed setup cache
- Fix Account OTP test with unique email, phone session re-login
- Fix GraphQL setup methods with sleep, 409 handling, missing columns
- Fix Databases list/pagination tests with document ID filtering
- Fix Permissions tests with assertGreaterThanOrEqual for counts
- Fix Messaging scheduled tests to not depend on scheduler timing
- Increase Realtime WebSocket timeout to 60s and assertEventually to 30s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:20:42 +13:00
Jake Barnby 2da4211f69 fix: Make E2E tests parallel-safe for functional mode
- Fix missing return statement in DatabasesBase::testListDocuments
- Rewrite DatabasesStringTypesTest with project-keyed setup cache
- Use assertGreaterThanOrEqual in Functions testListDeployments
- Clean up OIDC provider after Account OAuth2 test
- Key all GraphQL static caches by project ID with unique IDs
- Replace sleep() with assertEventually in Realtime tests
- Increase Messaging scheduled message timeout to 180s
- Increase Sites deployment timeouts to 120s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:25:19 +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
loks0n d864a61f93 chore: upgrade traefik 2026-02-06 19:16:37 +00:00
Jake Barnby c5ec632709 fix: Make Functions execution tests parallel-safe
- testListExecutions: Don't assume position in results list
- Use assertContains with array_column instead of position[0]

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:59:51 +13:00
Jake Barnby 870ccc9a1b fix: Fix webhook tests for parallel mode
- testDeleteUser: User is created with status=true, so assert that
- testUpdateUserStatus: Use probe to find correct webhook event

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:58:53 +13: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 627def5993 fix: Make Functions testListDeployments parallel-safe
- Use foreach loop to check all deployments instead of hardcoded indices
- Fix offset test to not assume exactly 1 function exists

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:25:10 +13:00
Jake Barnby 6e103393b8 fix: Fix undefined $data variables in Webhooks tests
- testCreateAttributes: Use $actorsId instead of undefined $data['actorsId']
- testCreateColumns: Use $actorsId instead of undefined $data['actorsId']
- testCreateAccountSession: Add assertion for account creation success

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:23:44 +13:00
Jake Barnby a4cca146d3 fix: Remove undefined $totalUsers and use parallel-safe assertions
The testListUsers function was using $totalUsers which was removed when
the test was refactored for parallel execution. Now uses $minUsers and
flexible assertions instead of position-based assertions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:22:14 +13:00
Jake Barnby 9f9d195daf fix: Add retry logic and defensive checks for Teams owner downgrade test
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:16:41 +13:00
Jake Barnby a79f33a3a1 fix: Remove incorrect json_decode in setupUser
The client body is already decoded as array, not JSON string.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:13:23 +13:00
Jake Barnby 6be719c9d4 fix: Add retry logic for 401 errors in ProjectCustom::getProject
Under high parallel load, authentication can transiently fail with 401.
Add retry logic with delays to handle these transient failures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:07:00 +13:00
Jake Barnby ce200d20d4 fix: Make webhook account tests self-sufficient
Update account name before testing to ensure webhook data has
expected 'New Name' value, regardless of test execution order.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:59:58 +13:00
Jake Barnby 8627251ae4 fix: Make testDeleteStorageBucket self-sufficient
Update bucket name before deleting to ensure webhook data has
expected name, regardless of whether testUpdateStorageBucket ran.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:59:16 +13:00
Jake Barnby 1f17dca7c9 fix: Handle 409 conflicts in GraphQL TablesDB tests
- setupDatabase() now fetches existing database on conflict
- setupTable() now fetches existing tables on conflict
- Enables parallel test execution with fixed resource IDs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:56:45 +13:00