Commit graph

6319 commits

Author SHA1 Message Date
Prem Palanisamy
6c35e86d98 Merge remote-tracking branch 'origin/feat-platform-db-access' into add-api-key-migration
# Conflicts:
#	app/controllers/api/migrations.php
#	app/controllers/shared/api.php
#	composer.json
#	composer.lock
#	src/Appwrite/Platform/Workers/Migrations.php
#	src/Appwrite/Utopia/Response/Model/MigrationReport.php
#	tests/e2e/Services/Migrations/MigrationsBase.php
2026-05-14 11:07:23 +01:00
Prem Palanisamy
f05b55add7 test: use project API key for platform migration E2E; bump migration lock 2026-05-14 06:15:55 +01:00
Prem Palanisamy
bddde5f298 Merge remote-tracking branch 'origin/1.9.x' into feat-platform-db-access
# Conflicts:
#	app/controllers/api/migrations.php
#	composer.json
#	composer.lock
#	src/Appwrite/Platform/Workers/Migrations.php
2026-05-13 16:36:39 +01:00
Jake Barnby
be2bb984c5
Merge pull request #12194 from appwrite/feat-insights-module
feat(insights): add insights module with CTA framework
2026-05-13 17:34:56 +12:00
Matej Bačo
af0c41dcf5 Fix avatars tests 2026-05-12 16:08:58 +02:00
Jake Barnby
304b0dab35
(fix): address greptile P1 review comments
- Add skipFilters to Reports/Get.php (was the only endpoint still
  triggering the full N+1 subquery cascade)
- Scale CTA batch limit dynamically (insightCount * MAX_CTA_COUNT)
  instead of fixed APP_LIMIT_SUBQUERY to prevent silent truncation
- Revert deleteReport to callback-based pagination so CTAs are not
  orphaned when a report has more than APP_LIMIT_SUBQUERY insights
- Add explicit prefix lengths (700) to _key_project_resource and
  _key_project_parent_resource indexes to stay under InnoDB 3072-byte limit
- Validate CTA service/method against ADVISOR_CTA_SERVICES and
  ADVISOR_CTA_METHODS enums in the CTAs validator

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 01:42:59 +12:00
Jake Barnby
fdb8e06f12
(test): fix misleading advisor e2e test names and assertions
- Rename testReportsAreReadOnly → testReportsCreateAndUpdateNotExposed
  (reports ARE deletable, they're not read-only)
- Extract testDeleteReportMissing with proper error type assertion
- Rename testInsightsAreReadOnly → testInsightsCreateUpdateDeleteNotExposed
- Fix insight create test to use correct URL (/reports/:id/insights)
  instead of nonexistent /manager/ prefix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-13 01:15:43 +12:00
Jake Barnby
8c8a56ed43
Merge pull request #12273 from appwrite/refactor-target-fetch
fix(messaging): remove redundant user fetch
2026-05-13 01:00:26 +12:00
Jake Barnby
4cd35e4d93
Merge branch '1.9.x' into feat-insights-module 2026-05-12 22:59:34 +12:00
Matej Bačo
5e1439f64e
Merge pull request #12276 from appwrite/feat-rework-project-response-model
Feat: Rework project response model
2026-05-12 12:57:16 +02:00
Matej Bačo
548077f01e Fix flaky test 2026-05-12 11:27:24 +02:00
Matej Bačo
da3a3b939a Finalize PR 2026-05-11 20:22:50 +02:00
Matej Bačo
36dec7c88f Fix more tests 2026-05-11 19:47:57 +02:00
Matej Bačo
5eb4c6b310 Fix tests 2026-05-11 18:38:30 +02:00
Matej Bačo
152b45087e Fix more tests 2026-05-11 17:01:00 +02:00
Levi van Noort
9b4f8d7ac0
Merge branch '1.9.x' into migrate-away-from-blacksmith-based-runners 2026-05-11 16:16:55 +02:00
Matej Bačo
5cd737b901 Backwards compatibility for GET /v1/project 2026-05-11 15:08:15 +02:00
Jake Barnby
c18865423e
Merge remote-tracking branch 'origin/1.9.x' into feat-insights-module
# Conflicts:
#	composer.lock
#	src/Appwrite/Platform/Workers/Migrations.php
2026-05-12 00:23:17 +12:00
Jake Barnby
53d18a0d08
refactor(advisor): rename module to Advisor (service-named, top-level)
The module's namespace and directory now match the top-level service
name (`advisor`) instead of one of its resource names (`insights`):

- src/Appwrite/Platform/Modules/Insights -> .../Modules/Advisor
- src/Appwrite/Insights -> src/Appwrite/Advisor
- tests/unit/Insights -> tests/unit/Advisor
- Route group label flipped from `'insights'` to `'advisor'`
- Section-header comments aligned

Resource names (`insights`, `reports`, `insightCTAs`) and the
`Insight*`/`Report` response models stay — those are the resources the
service exposes, not the service itself.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 23:40:06 +12:00
Jake Barnby
4e73559eb7
Merge branch '1.9.x' into refactor-target-fetch 2026-05-11 23:31:18 +12:00
Jake Barnby
d2e4ed6a11
test(messaging): skip users recipient test when push DSN not configured
CI lacks _APP_MESSAGE_PUSH_TEST_DSN, so new DSN(null) threw a TypeError
before the existing skip guard could run. Match the pattern used by
testSendPushNotification: gate on the env var first, then construct the DSN.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 22:58:29 +12:00
Matej Bačo
83887b09b6 Improve project get tests 2026-05-11 12:47:53 +02:00
Matej Bačo
4e36040f47 Add project GET tests 2026-05-11 12:22:17 +02:00
copilot-swe-agent[bot]
2a47ccc0f9
test(messaging): add users recipient e2e coverage and fix user target query limit
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/8ea97768-3304-4a3c-81e2-d62d6fe3ad80

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-11 10:03:02 +00:00
premtsd-code
0b2a9240b3
Merge branch '1.9.x' into feat-bump-sdk-23 2026-05-11 10:28:38 +01:00
Levi van Noort
c95901b879
Merge branch '1.9.x' into migrate-away-from-blacksmith-based-runners 2026-05-11 10:50:29 +02:00
Levi van Noort
702a8a83a0 test: add assertion for action execution logs content in SitesCustomServerTest 2026-05-11 10:30:08 +02:00
Levi van Noort
5be05da5ca
Merge branch '1.9.x' into migrate-away-from-blacksmith-based-runners 2026-05-11 10:27:46 +02:00
Levi van Noort
fe5e5b8891 refactor: enhance execution log checks in SitesCustomServerTest 2026-05-11 10:17:55 +02:00
premtsd-code
04a6eaf5d4
Merge branch '1.9.x' into feat-bump-sdk-23 2026-05-11 05:54:00 +01:00
Prem Palanisamy
f0fb7bf877 test: remove orphaned VectorsDB testGetCollectionLogs
Endpoint deleted in 96fe989f6d ("update composer dependencies and remove
obsolete log classes") but the two test methods calling it were left
behind. They have been failing with 404 on every PR since.
2026-05-11 05:53:03 +01:00
copilot-swe-agent[bot]
49bf1198b2
refactor(advisor): polish constants aliases and insight lookup helper
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/517a4586-d3e8-40b3-a3a9-f2d2ca82b0a0

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-11 02:08:29 +00:00
copilot-swe-agent[bot]
bfd6cebbb0
fix(advisor): address review comments on tests, naming, docs, and get insight
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/517a4586-d3e8-40b3-a3a9-f2d2ca82b0a0

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-11 01:59:31 +00:00
Matej Bačo
e45e5a09f4 Reorder tests to make them pass 2026-05-10 13:19:18 +02:00
Matej Bačo
e3dc30ad93 PR review fixes 2026-05-10 12:03:05 +02:00
Matej Bačo
fbfde6cc77 Implement google oauth prompt param. 2026-05-10 11:11:47 +02:00
Matej Bačo
a5ddc465e6 PR review fixes 2026-05-09 12:53:11 +02:00
Matej Bačo
43777ee6d9 Add unit tests for github hints 2026-05-09 10:16:19 +02:00
Jake Barnby
8fa9ead279
chore: merge 1.9.x into feat-insights-module
Resolves conflict in app/init/constants.php (kept 4327 cache buster, took 1.9.4 stable version).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 17:59:01 +12:00
Jake Barnby
b747c97561
fix(advisor): address review comments on scopes and schema
- Register dedicated reports.write scope and switch deleteReport to it
  so cloud can issue narrowly-scoped delete keys without granting
  insights.write.
- Make insights.parentResourceInternalId optional with null default to
  match its companion parentResourceType/parentResourceId fields and
  unblock insights with no parent (e.g. database-level performance
  insights).
- Tighten Insight.reportId model description: insights always belong to
  a report, ad-hoc insights are not supported.
- Add reports.write to default test API key and admin role so existing
  e2e tests using serverHeaders() can hit the delete endpoint.
- Bump APP_CACHE_BUSTER for the schema change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 12:18:39 +12:00
Jake Barnby
5ba92c7ff4
test(proxy): clean up rules before deleting their site
testCreateRedirectRule reassigned $ruleId for the second redirect rule,
so only the second was tracked, and cleanupSite was called before
cleanupRule. Site deletion cascades to its rules, so cleanupRule then
saw a 404 and the strict assertEquals(204) blew up.

Track both rule IDs and tear them down before the site so the asserted
204 actually fires.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 02:09:48 +12:00
Jake Barnby
a23555783f
test(advisor): initialise project before getNewKey
testReadWithAdvisorScopes called getNewKey() as its first action, but
getNewKey reads self::$project['$id'] without triggering project
creation. ParaTest runs each test method in a fresh worker, so
self::$project is empty until getProject() is called. The empty id
produced /v1/projects//keys, which doesn't match any route and 404s.

Call getProject() first, like every other consumer of getNewKey.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 01:49:22 +12:00
Chirag Aggarwal
9295869279
Fix GraphQL preview test assertions 2026-05-08 17:51:42 +05:30
harsh mahajan
3fbe77a27c Fix repository branch cursorBefore pagination 2026-05-08 13:31:32 +05:30
harsh mahajan
1a0a19a793 Add search and pagination for repository branches 2026-05-08 13:25:35 +05:30
copilot-swe-agent[bot]
6d0eab2583
refactor(advisor): make insights API read-only in CE
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/8d7897b5-ac68-487d-954a-be717380bf66

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-08 06:07:23 +00:00
Chirag Aggarwal
3d35d140d1
Relax storage preview cache hit max age 2026-05-08 11:27:35 +05:30
Chirag Aggarwal
9337daf7ac
Preserve default storage cache hit max age 2026-05-08 11:15:17 +05:30
copilot-swe-agent[bot]
0829b26508
refactor(insights): remove redundant payload field
Agent-Logs-Url: https://github.com/appwrite/appwrite/sessions/a680e208-34b8-4bae-a7fd-51949112233a

Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
2026-05-08 05:44:20 +00:00
Chirag Aggarwal
2207fff44d
Wait for storage preview cache hit in e2e 2026-05-08 10:52:31 +05:30