You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No actionable comments were generated in the recent review.
Walkthrough
checkAttribute accepts an optional list of pending attributes and includes them with the requested attribute when checking collection limits. The check uses a cloned collection. A unit test covers the attribute-count limit.
checkAttribute includes pending attributes in its existing limit checks. A unit test verifies that the check throws LimitException when pending and requested attributes exceed the attribute limit.
This change makes attribute limit checks count pending attributes, and the new unit test covers the attribute-count limit. Existing callers that omit the new optional argument keep their current behavior. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "Fix check attribute pending" names the changed method (checkAttribute) and the new pending-attributes behavior. The change adds an optional pending list to checkAttribute so pending attribu…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "Fix check attribute pending" names the changed method (checkAttribute) and the new pending-attributes behavior. The change adds an optional pending list to checkAttribute so pending attributes count toward the attribute-count and row-width limits, and adds a test for that case. The title is short and specific, though it is terse and does not state the effect of the fix.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Reviewing files that changed from the base of the PR and between b494b76 and 28390a6.
Files selected for processing: 2
src/Database/Trait/Attributes.php
tests/unit/Attributes/CheckAttributeTest.php
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This adds an optional pending-attributes list to checkAttribute and includes those attributes when checking adapter limits. It also adds a unit test showing that pending attributes count toward the attribute limit.
Verdict
New comments
Fixed
Still open
✅ Approved
0
0
0
📂 Walkthrough · 2
File
Change
src/Database/Trait/Attributes.php
Added optional pending attributes to the limit-check simulation.
tests/unit/Attributes/CheckAttributeTest.php
Added coverage for pending attributes exceeding the attribute-count limit.
🔇 Filtered out · 1
Findings Hansi considered but did not post.
Finding
Why
Cover pending attributes against the row-width limit too
Verifier: This is a request for more test coverage, not a bug. Pending attributes are appended to the same $definition that both the count check and the width check read. The new unit test for the count limit already exercises that loop. A separate width test would add little.
Reviewed 28390a6 · Details · Comment @appwrite review to re-run, or mention @appwrite with a question.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit