Skip to content

Conversation

@ItzNotABug
Copy link
Member

@ItzNotABug ItzNotABug commented Jan 7, 2026

Summary by CodeRabbit

  • Refactor
    • Streamlined storage enumeration process to improve reporting efficiency and reduce API query overhead.

✏️ Tip: You can customize this high-level summary in your review settings.

@ItzNotABug ItzNotABug self-assigned this Jan 7, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

The reportStorage method in src/Migration/Sources/Appwrite.php was refactored to simplify file enumeration per bucket. The previous pagination loop that fetched files page-by-page was replaced with a single file fetch using Query::limit(1). File counts now derive from the aggregated total in the response rather than summing individual file entries, and bucket sizes are retrieved directly from the bucket['totalSize'] field instead of accumulated from individual files. The final size conversion to megabytes remains unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add: totalSize support on migrations' directly describes the main change in the pull request, which is leveraging the totalSize aggregate from bucket responses instead of paginating through individual files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1b8d551 and 2cdc28c.

📒 Files selected for processing (1)
  • src/Migration/Sources/Appwrite.php
🧰 Additional context used
🧬 Code graph analysis (1)
src/Migration/Sources/Appwrite.php (2)
src/Migration/Sources/Appwrite/Reader/API.php (1)
  • report (28-125)
src/Migration/Sources/Appwrite/Reader/Database.php (1)
  • report (27-116)

@abnegate abnegate merged commit c5e3f5e into main Jan 7, 2026
4 checks passed
@abnegate abnegate deleted the improve-storage branch January 7, 2026 14:48
@ItzNotABug ItzNotABug mentioned this pull request Jan 8, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants