Skip to content

Conversation

@loks0n
Copy link
Member

@loks0n loks0n commented Dec 17, 2025

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

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@loks0n loks0n changed the base branch from main to 1.8.x December 17, 2025 14:19
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

This pull request implements a comprehensive architectural refactoring and feature expansion. Key changes include: migrating authentication logic from Auth-based constants to User document-based authorization patterns; introducing new token/password proof mechanisms via Utopia auth libraries; implementing multi-stage Docker builds with production and development targets; expanding database schemas with email metadata attributes and file transformation capabilities; adding new API features including avatar screenshots generation and CSV export functionality; integrating a Resend email provider; establishing centralized platform configuration management; introducing CoreDNS for testing; and upgrading multiple core dependencies. The refactoring spans infrastructure, configuration, database models, authentication flows, and API controllers throughout the codebase.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Areas requiring extra attention:

  • Authentication and authorization migration: Systematic replacement of Auth-based checks with User document methods across controllers (avatars, health, graphql, locale, messaging, teams, users, vcs, storage, shared/api, shared/api/auth) requires verification that all access control logic remains semantically equivalent
  • Token and session handling refactoring: New Password, Token, and Store proof mechanisms introduced in teams, users, and resource registration (app/init/resources.php) need careful validation of credential generation, validation, and serialization
  • Platform configuration and CORS integration: New platform context propagation through app/controllers/general.php and app/init/resources.php, including origin validation and CORS handling, affects routing and cross-origin request policies
  • Database schema and document type registration: Addition of email metadata attributes (emailCanonical, emailIsFree, emailIsDisposable, emailIsCorporate, emailIsCanonical) and transformations attribute; setDocumentType('users', User::class) registrations across multiple database instances require schema consistency verification
  • Docker multi-stage build and CoreDNS infrastructure: Dockerfile refactoring from single-stage to production/development targets and new CoreDNS service integration with static IP addressing (172.16.238.100) should be validated for development and production workflows
  • Storage bucket transformations feature: New transformations boolean attribute added to bucket creation/update/retrieval across createBucket, updateBucket, and related endpoints; requires consistency check across all affected paths
  • Messaging provider integration: New Resend email provider support (createResendProvider, updateResendProvider) follows existing provider patterns but adds new provider branching logic that should be verified for correctness
  • API endpoint parameter and validator changes: Widespread addition of Nullable wrappers for optional parameters, total/includeTotal flags for pagination, and new parameter validators across multiple list endpoints (projects, storage, migrations, messaging) requires consistency review
  • Config adapter and resource dependencies: Introduction of ConfigAdapter for Config::load calls and new public resources (allowedHostnames, originValidator, redirectValidator, cors, proofForPassword, proofForToken, proofForCode) affects dependency injection and initialization order
  • Dependency version upgrades: Bumped versions for utopia-php packages (config: 0.2.* → 1.., database: 2.* → 3., dns: 0.3. → 1.4.*) and new dependencies (utopia-php/auth, utopia-php/emails) may introduce breaking API changes requiring compatibility verification

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is completely empty of actual implementation details, only containing the contribution template placeholder text with no explanation of what changes are made or why. Fill in the PR description with a clear explanation of what this PR does, why the changes were made, and how to test them. The current description only contains template placeholders.
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Fix sync updated schedules' is vague and does not clearly relate to the extensive changeset, which involves infrastructure, configuration, authentication, storage, and API modifications across numerous files. Provide a more specific title that accurately reflects the main changes, such as 'Refactor authentication, storage, and configuration systems' or 'Migrate from Auth class to User-based authorization and add platform context'.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-sync-updated-schedules

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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 17, 2025

Open in StackBlitz

npm i https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@10977

commit: ee8e733

@github-actions
Copy link

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
libpng 1.6.51-r0 CVE-2025-66293 HIGH
libpng-dev 1.6.51-r0 CVE-2025-66293 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@github-actions
Copy link

✨ Benchmark results

  • Requests per second: 1,106
  • Requests with 200 status code: 199,145
  • P99 latency: 0.176098261

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,106 1,140
200 199,145 205,220
P99 0.176098261 0.176668345

@loks0n loks0n merged commit 5149346 into 1.8.x Dec 17, 2025
89 of 90 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Dec 18, 2025
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