Skip to content

Conversation

fogelito
Copy link
Contributor

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?

Copy link
Contributor

coderabbitai bot commented Sep 18, 2025

📝 Walkthrough

Walkthrough

Adds two ascending ordering clauses to the variables subquery in app/init/database/filters.php: Query::orderAsc('resourceType') followed by Query::orderAsc(), positioned before limit(APP_LIMIT_SUBQUERY). No changes to filtering logic, error handling, or function signatures.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description Check ❓ Inconclusive The PR description is only the repository contribution template with placeholder headings and contains no details about the implemented change, motivation, test plan, or related issues; it therefore does not meaningfully describe the changes (which modify ordering in app/init/database/filters.php). Request the author replace the template with a short summary of what changed and why, list affected files (e.g., app/init/database/filters.php), provide a test plan or verification steps, and link any related issues or PRs so reviewers can assess correctness and impact.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Sub query variables order by" directly references the primary change described in the diff (adding ORDER BY clauses to the subQueryVariables filter in app/init/database/filters.php) and is concise and relevant for a reviewer scanning PR history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sub-query-variables-order-by

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 34f3501 and 4da7f04.

📒 Files selected for processing (1)
  • app/init/database/filters.php (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). (20)
  • GitHub Check: E2E Service Test (Health)
  • GitHub Check: E2E Service Test (Migrations)
  • GitHub Check: E2E Service Test (GraphQL)
  • GitHub Check: E2E Service Test (Users)
  • GitHub Check: E2E Service Test (Sites)
  • GitHub Check: E2E Service Test (Storage)
  • GitHub Check: E2E Service Test (Proxy)
  • GitHub Check: E2E Service Test (Teams)
  • GitHub Check: E2E Service Test (Locale)
  • GitHub Check: E2E Service Test (FunctionsSchedule)
  • GitHub Check: E2E Service Test (Dev Keys)
  • GitHub Check: E2E Service Test (Account)
  • GitHub Check: E2E Service Test (Console)
  • GitHub Check: E2E Service Test (Databases/TablesDB)
  • GitHub Check: E2E Service Test (Databases/Legacy)
  • GitHub Check: E2E Service Test (Functions)
  • GitHub Check: E2E Service Test (Site Screenshots)
  • GitHub Check: Unit Test
  • GitHub Check: E2E General Test
  • GitHub Check: Benchmark
🔇 Additional comments (1)
app/init/database/filters.php (1)

258-260: Add a missing sort attribute to Query::orderAsc() to avoid ArgumentCountError

File: app/init/database/filters.php — lines 258–260

Query::orderAsc() requires an attribute; calling it without one will throw ArgumentCountError. Apply this minimal fix:

-                Query::orderAsc('resourceType'),
-                Query::orderAsc(),
+                Query::orderAsc('resourceType'),
+                Query::orderAsc('key'),

Confirm 'key' exists on the variables collection and is appropriate for sorting (or use a different attribute); consider a final tie‑breaker on $id for fully deterministic ordering.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH
stdlib 1.22.10 CVE-2025-47907 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

Copy link

✨ Benchmark results

  • Requests per second: 1,241
  • Requests with 200 status code: 223,504
  • P99 latency: 0.156734149

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,241 1,014
200 223,504 182,591
P99 0.156734149 0.192840858

@abnegate abnegate merged commit 9a0ab6c into 1.8.x Sep 18, 2025
41 checks passed
@abnegate abnegate deleted the sub-query-variables-order-by branch September 18, 2025 08:25
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.

2 participants