Commit Graph

74 Commits

Author SHA1 Message Date
Chirag Aggarwal 9d7df34590 fix: clean up php 8.5 runtime deprecations 2026-04-29 14:47:05 +05:30
Chirag Aggarwal c978b6f34f Stabilize function deployment activation in tests 2026-04-03 23:58:25 +05:30
Matej Bačo 564f56e0f5 Finalize tests 2026-03-18 16:12:47 +01:00
Jake Barnby bada1a7c05 Timing updates 2026-02-24 14:00:07 +13:00
Jake Barnby f2759cb65a fix: remove file caching, disable --functional for Databases/Functions/Realtime
Services that depend on shared static state between test methods
(Databases, Functions, Realtime) now run without --functional flag,
so test methods execute sequentially within each class while classes
still run in parallel. All other services keep --functional mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 03:44:28 +13:00
Jake Barnby 32c84ae869 fix: retry on TCP connection errors in callWithAuthRetry for Functions tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 03:29:31 +13:00
Jake Barnby abdceb831a fix: resolve E2E test failures for screenshots, account logs, risky tests, and deployment timeouts
- Accept 404 alongside 200 for screenshot tests with custom headers/permissions (browser service CI limitation)
- Fix testGetAccountLogs to expect 1 log (session.create only, user.create audit not triggered for self-service)
- Move getSupportForOperators() check before any assertions in testOperators/testBulkOperators (PHPUnit 12 risky test fix)
- Increase deployment build/activation polling timeout from 240s to 360s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 20:43:51 +13:00
Jake Barnby b976454416 fix: add early failure detection and increase polling timeouts
Throw Critical exception when attribute/index/deployment status is
'failed' to fail tests immediately instead of waiting 15-20 minutes.
Increase default schema polling timeouts from 15 to 20 minutes for
CI stability under parallel load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:51:59 +13:00
Jake Barnby 89f0f227d6 fix: resolve CI failures in database, functions, and realtime tests
- Increase SchemaPolling default timeouts from 8min to 15min for
  waitForAttribute, waitForAttributes, waitForAttributeCount, and
  waitForIndex to match waitForAllAttributes/waitForAllIndexes. Under
  parallel test load the database worker gets backlogged, causing
  attributes to stay in 'processing' state longer than 8 minutes.
- Add isEmpty check in Functions Delete before updating schedules to
  prevent 500 errors when the schedule document is missing (consistent
  with other modules like Executions/Delete).
- Add retry logic to cleanupFunction in FunctionsBase for transient
  MongoDB transaction abort errors during function deletion.
- Increase Realtime attribute/index polling timeouts from 2min to 15min
  to handle worker backlog under CI load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 17:22:51 +13:00
Jake Barnby ce0b7ab455 fix: increase function deployment build timeout to 4 minutes
FunctionsBase deployment polling was only 100 seconds, insufficient
under CI load when build workers are busy. Increased to 240 seconds
for both deployment readiness and activation checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 06:10:18 +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 991af09fdf fix: improve auth retry resilience for MongoDB CI stability
- Increase callWithAuthRetry from 5 to 8 retries with capped delay (50s total)
- Increase ProjectCustom retries from 3 to 5 with 1s delays
- Fix swapped assertEquals parameters in FunctionsBase for clearer errors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 21:46:24 +13:00
Jake Barnby 52606f352c fix: handle 401 in assertEventually and increase curl timeout to 30s
- setupDeployment's assertEventually callbacks now handle 401 responses
  gracefully instead of crashing with "Undefined array key"
- Increase Client curl timeout from 15s to 30s for slow CI runners
  (testDeleteScheduledExecution and testGetScreenshotWithPermissions
  were hitting the 15s limit)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 10:37:07 +13:00
Jake Barnby 37b857903a fix: add callWithAuthRetry to FunctionsBase for transient 401s
Extract retry logic into a reusable callWithAuthRetry helper with
exponential backoff (5 retries, 2/4/6/8s delays). Apply to both
setupFunction and setupDeployment.

Previous fix only retried setupFunction, but 401 can hit any API call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 10:07:26 +13:00
Jake Barnby efb523dab4 fix: add retry logic to setupFunction for flaky 401 auth errors
All 15 FunctionsCustomServerTest failures originate from setupFunction()
getting a transient 401 when the API key lookup fails under CI load.
Retry up to 3 times with a 2s delay on 401 responses.

Remove the per-method #[Retry] on testScopes since the root fix is now
in setupFunction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 09:53:14 +13: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
Matej Bačo 4807dcf529 Array support for all functions domain usecases 2026-01-30 16:48:40 +01:00
Hemachandar fd466dfcea Revert "Update deploymentId in sites rule for first deployment" 2025-11-27 16:31:14 +05:30
Hemachandar 52766cfdba Merge branch '1.8.x' into ser-550 2025-11-17 14:57:00 +05:30
Hemachandar ba542554ce functions and more tests 2025-11-17 14:53:26 +05:30
Atharva Deosthale 2a145bc284 address reviews regarding tests 2025-09-19 18:18:44 +05:30
Atharva Deosthale 9fe3e94a66 e2e tests 2025-09-18 13:12:46 +05:30
loks0n 71c54f5742 tests: increase deployment timeouts
commit-id:7d7dffac
2025-06-02 19:05:23 +01:00
Matej Bačo bb01c9e9e9 Add latest deployment tests 2025-03-20 15:22:35 +01:00
Matej Bačo ba26dd6df5 Apply consistency of attributes 2025-03-11 16:26:49 +01:00
Matej Bačo be3d18ab41 Fix test 2025-03-10 12:56:20 +01:00
Matej Bačo 3730ff4895 Fix SDK generation 2025-03-09 00:19:54 +01:00
Matej Bačo 5f766f6a13 Merge branch 'feat-sites' into chore-rules-rehaul 2025-03-08 21:33:13 +01:00
Matej Bačo f75acfa503 Remove deploymentUpdatePolicy, add trigger 2025-03-08 19:19:05 +01:00
Matej Bačo c6a862a0a3 Specifications test, fix failures 2025-03-07 23:17:15 +01:00
Matej Bačo 9400fdbbe5 Leftover bugs after rework 2025-03-07 10:43:54 +01:00
Matej Bačo 825e9639b1 Move cancel build to deployment endpoint 2025-03-06 12:20:08 +01:00
Matej Bačo 87a9d72523 Merge branch 'feat-sites' into chore-rename-redeploy-endpoint 2025-03-05 12:33:17 +01:00
Matej Bačo f6674f07e4 Add redeploy tests 2025-03-05 12:29:27 +01:00
Matej Bačo ea30d976a8 Fix wrong path, implement tests 2025-03-04 16:04:37 +01:00
Matej Bačo 64183f2946 Fix tests, remove leftovers 2025-03-04 13:45:44 +01:00
Matej Bačo 72d2ba0159 Add missing download endpoints, ensure with tests 2025-02-28 12:04:17 +01:00
Matej Bačo eb7daf3edd Finalize rules overhauls 2025-02-24 11:55:59 +01:00
Matej Bačo 666e8f3ec9 Separate proxy rule creation 2025-02-22 18:56:51 +01:00
Matej Bačo f9bc5d0cce Fix tests 2025-02-21 22:10:39 +01:00
Khushboo Verma 262b152cd9 Add more rule tests 2025-02-18 12:12:12 +05:30
Khushboo Verma 2ea18c4761 Fix domain generation 2025-02-17 18:12:29 +05:30
Matej Bačo 2f2a743a7f Merge branch 'feat-sites' into feat-all-rules-in-proxy 2025-02-17 09:47:33 +01:00
Khushboo Verma b1854fee10 Add helper methods in functionBase 2025-02-15 23:23:02 +05:30
Matej Bačo 28339f0ed7 createTemplateDeployment for sites and deployments 2025-02-15 00:36:46 +01:00
Khushboo Verma f96291af88 Add tests for function variables 2025-02-10 16:24:14 +05:30
Jake Barnby 8bc37026cd Revert "Feat adding coroutines" 2024-10-08 20:54:40 +13:00
Binyamin Yawitz 16835f96bf chore: merge 2024-10-07 11:02:18 -04:00
Binyamin Yawitz d14edf4207 reverting: to set coroutines as head 2024-10-01 10:30:47 -04:00
Matej Bačo 0753163066 PR review changes 2024-09-25 13:32:09 +02:00