Skip to content

feat: use juspay diesel - #360

Open
yuvrajjsingh0 wants to merge 2 commits into
mainfrom
feat/use-juspay-diesel
Open

feat: use juspay diesel#360
yuvrajjsingh0 wants to merge 2 commits into
mainfrom
feat/use-juspay-diesel

Conversation

@yuvrajjsingh0

@yuvrajjsingh0 yuvrajjsingh0 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added support for a local database-layer compatibility shim across the workspace.
    • Improved dependency handling so the app can use the updated database library consistently.
  • Bug Fixes

    • Updated distinct-count logic in file and group listings for more reliable total item counts.
    • Aligned database-related features and version constraints to better match the runtime environment.
  • Documentation

    • Added clearer explanatory comments around the database compatibility setup.

@semanticdiff-com

semanticdiff-com Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  airborne_server/src/file/groups.rs  20% smaller
  Cargo.lock Unsupported file format
  Cargo.toml Unsupported file format
  airborne_server/Cargo.toml Unsupported file format
  airborne_server/src/file.rs  0% smaller
  diesel-shim/Cargo.toml Unsupported file format
  diesel-shim/src/lib.rs  0% smaller
  flake.nix Unsupported file format

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3cea141d-ebc3-4ba1-9a50-8a286ac425b3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Adds a local diesel-shim crate re-exporting juspay_diesel as diesel, patches the workspace to redirect diesel to it, updates airborne_server's diesel dependency to target juspay_diesel 2.3.1 with rds-proxy, relaxes diesel_migrations version constraint, and updates distinct-count query syntax in two files.

Changes

Diesel Shim Migration

Layer / File(s) Summary
New diesel-shim crate
diesel-shim/Cargo.toml, diesel-shim/src/lib.rs
Defines a local diesel shim crate depending on juspay_diesel 2.3.1, forwarding feature flags, and re-exporting all juspay_diesel items publicly.
Workspace patch wiring
Cargo.toml
Adds diesel-shim to workspace members and a [patch.crates-io] entry redirecting diesel to the local shim path.
Server dependency update
airborne_server/Cargo.toml
Aliases diesel to juspay_diesel package at version 2.3.1 with rds-proxy feature added, and relaxes diesel_migrations to ~2.2.
Distinct-count query adjustments
airborne_server/src/file.rs, airborne_server/src/file/groups.rs
Removes AggregateExpressionMethods imports and replaces count(...).aggregate_distinct() with diesel::dsl::count_distinct(...) for total item counts.

Estimated code review effort: 2 (Simple) | ~12 minutes

Sequence Diagram(s)

sequenceDiagram
    participant Build as Cargo Build
    participant Workspace as Workspace Cargo.toml
    participant Shim as diesel-shim crate
    participant Fork as juspay_diesel crate
    participant Server as airborne_server

    Build->>Workspace: Resolve diesel dependency
    Workspace->>Shim: patch.crates-io redirects diesel
    Shim->>Fork: pub use juspay_diesel::*
    Server->>Shim: use diesel::dsl::count_distinct(...)
    Shim->>Fork: forwards to juspay_diesel implementation
    Fork-->>Server: returns query results
Loading

Estimated code review effort: 2 (Simple) | ~12 minutes

Poem

A rabbit hops through crates so deep,
Redirecting diesel while others sleep. 🐇
juspay_diesel now takes the wheel,
count_distinct counts what's truly real.
Hop, patch, and build — a shim complete! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: switching the workspace to use juspay diesel.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/use-juspay-diesel

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.

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.

1 participant