Conversation
📝 WalkthroughWalkthroughBumps the Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Multiple heterogeneous changes: dependency major-version bump, constructor/signature change with many new validation flags, constant rename across runtime and tests, and test expectation edits. Review should cover adapter API compatibility, validator semantics, and test correctness. Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Security Scan Results for PRDocker Image Scan Results
Source Code Scan Results🎉 No vulnerabilities found! |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
composer.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
composer.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Setup & Build Appwrite Image
- GitHub Check: Setup & Build Appwrite Image
- GitHub Check: scan
✨ Benchmark results
⚡ Benchmark Comparison
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
composer.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
composer.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Setup & Build Appwrite Image
- GitHub Check: Setup & Build Appwrite Image
- GitHub Check: scan
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php (1)
74-75: If vector indexes are supported, expand type whitelist accordingly.New adapter flag getSupportForVectors() suggests vector indexes may be available, but 'type' whitelist excludes a vector type. If v3 defines Database::INDEX_VECTOR, expose it here; otherwise users can’t create vector indexes via this endpoint.
If confirmed, consider:
- ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE, Database::INDEX_SPATIAL]), 'Index type.') + ->param('type', null, new WhiteList( + (function () { + $types = [Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE, Database::INDEX_SPATIAL]; + if (defined('Utopia\\Database\\Database::INDEX_VECTOR')) { + $types[] = constant('Utopia\\Database\\Database::INDEX_VECTOR'); + } + return $types; + })(), + false, + Database::VAR_STRING + ), 'Index type.')Use the verification script above to confirm whether INDEX_VECTOR exists in v3.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php(3 hunks)tests/e2e/Services/Databases/Legacy/DatabasesBase.php(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
- GitHub Check: E2E Service Test (Proxy)
- GitHub Check: E2E Service Test (Storage)
- GitHub Check: E2E Service Test (FunctionsSchedule)
- GitHub Check: E2E Service Test (Databases/TablesDB)
- GitHub Check: E2E Service Test (Health)
- GitHub Check: E2E Service Test (Account)
- GitHub Check: E2E Service Test (Databases/Legacy)
- GitHub Check: E2E Service Test (GraphQL)
- GitHub Check: E2E Service Test (Console)
- GitHub Check: E2E Service Test (Avatars)
- GitHub Check: E2E Shared Mode Service Test (Dev Keys) (Shared V2)
- GitHub Check: E2E Shared Mode Service Test (Dev Keys) (Shared V1)
- GitHub Check: E2E Shared Mode Service Test (Site Screenshots) (Shared V1)
- GitHub Check: E2E Service Test (Site Screenshots)
- GitHub Check: E2E Shared Mode Service Test (Site Screenshots) (Shared V2)
- GitHub Check: E2E Service Test (Dev Keys)
- GitHub Check: Unit Test
- GitHub Check: E2E General Test
- GitHub Check: scan
🔇 Additional comments (3)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php (3)
163-167: Non-functional: comment tweak is fine.No behavior change; nothing to action.
169-176: Array attributes: length cap set to MAX_ARRAY_INDEX_LENGTH.Good catch on the constant rename; setting order to null for array attributes remains consistent.
Please confirm Database::MAX_ARRAY_INDEX_LENGTH exists in utopia-php/database v3 to avoid runtime errors.
193-205: Parameter order and system attributes handling verified as correct; review concerns are unfounded.The IndexValidator v3.0.0 constructor signature matches exactly with the 11 parameters passed in the code. All arguments are in the correct order and types.
Regarding system attributes: the validator's constructor automatically enriches the provided attributes with
Database::INTERNAL_ATTRIBUTES(which includes$id,$createdAt,$updatedAt). Passing only$collection->getAttribute('attributes')is the correct approach—the validator handles system fields internally.The
$adapterrefactor suggestion is valid but optional; it's a minor style improvement to reduce repeated method calls, not a correctness issue.
What does this PR do?
(Provide a description of what this PR does and why it's needed.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)
Related PRs and Issues
Checklist