Skip to content

chore(deps): bump sea-orm & sea-orm-migration to 2.0 - #2422

Open
cyberantonz wants to merge 1 commit into
constructorfabric:mainfrom
cyberantonz:chore/deps-sea-orm-2.0
Open

chore(deps): bump sea-orm & sea-orm-migration to 2.0#2422
cyberantonz wants to merge 1 commit into
constructorfabric:mainfrom
cyberantonz:chore/deps-sea-orm-2.0

Conversation

@cyberantonz

@cyberantonz cyberantonz commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Consolidates the two Dependabot bumps into a single PR and makes the backend compile against the new major:

Both must move together — a split bump leaves two sea_orm versions in the graph and the Statement type stops matching across the boundary.

SeaORM 2.0 API migration

  • ConnectionTrait::{execute,query_one,query_all} now take an &impl StatementBuilder. Raw sea_orm::Statement values run through the new {execute,query_one,query_all}_raw methods (by value).
  • sea_query Value::Bytes now holds Option<Vec<u8>> instead of Option<Box<Vec<u8>>>; the Box wrapper is dropped.
  • DatabaseConnection::Disconnected moved onto DatabaseConnectionType; the disconnected sentinel is now DatabaseConnection::default().
  • Dropped ConnectionTrait imports that are no longer needed at call sites.

Verification

  • cargo build --workspace — clean
  • cargo clippy --workspace --all-targets — clean (workspace denies pedantic)
  • cargo test --workspace --no-run — all test binaries link
  • pre-commit (cargo fmt, cargo clippy) — pass

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Maintenance

    • Updated database connectivity components for compatibility with the latest database framework version.
    • Improved consistency of database queries, updates, migrations, and seed operations across analytics and identity-resolution services.
    • Preserved existing SQL behavior, data mappings, migration flows, and error handling.
  • Tests

    • Updated integration tests and test fixtures to reflect the database compatibility changes.
    • Existing test assertions and expected behavior remain unchanged.

Combines the two Dependabot bumps (sea-orm constructorfabric#2412, sea-orm-migration
constructorfabric#2411) into one change and migrates the backend to the SeaORM 2.0 API:

- ConnectionTrait::{execute,query_one,query_all} now take a
  StatementBuilder by reference; raw sea_orm::Statement values go
  through the new {execute,query_one,query_all}_raw methods (by value).
- sea_query Value::Bytes now holds Option<Vec<u8>> instead of
  Option<Box<Vec<u8>>>; drop the Box wrapper.
- DatabaseConnection::Disconnected moved onto DatabaseConnectionType;
  use DatabaseConnection::default() for the disconnected sentinel.
- Drop ConnectionTrait imports that are no longer needed at call sites.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Anton Zelenov <antonz@constructor.tech>
@cyberantonz
cyberantonz requested a review from a team as a code owner August 11, 2026 06:39
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 520e3c1e-d39d-4a02-ba1e-256d2f79beaa

📥 Commits

Reviewing files that changed from the base of the PR and between f45db64 and dd74f6f.

⛔ Files ignored due to path filters (1)
  • src/backend/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (36)
  • src/backend/Cargo.toml
  • src/backend/services/analytics/src/domain/metric_crud.rs
  • src/backend/services/analytics/src/domain/metric_crud_live_tests.rs
  • src/backend/services/analytics/src/domain/metric_definitions/listing.rs
  • src/backend/services/analytics/src/domain/metric_definitions/live_tests.rs
  • src/backend/services/analytics/src/domain/metric_definitions/repository.rs
  • src/backend/services/analytics/src/domain/metric_definitions/seeds.rs
  • src/backend/services/analytics/src/domain/metric_definitions/test_fixture.rs
  • src/backend/services/analytics/src/domain/metric_definitions/validator.rs
  • src/backend/services/analytics/src/domain/metric_drilldown/capability.rs
  • src/backend/services/analytics/src/domain/metric_drilldown/validation.rs
  • src/backend/services/analytics/src/infra/db/check_probe.rs
  • src/backend/services/analytics/src/migration/m20260527_000001_seed_metric_catalog.rs
  • src/backend/services/analytics/src/migration/m20260529_000001_metric_query_catalog_link.rs
  • src/backend/services/analytics/src/migration/m20260601_000002_seed_claude_team_metrics_catalog.rs
  • src/backend/services/analytics/src/migration/m20260603_000001_seed_crm_metric_catalog.rs
  • src/backend/services/analytics/src/migration/m20260603_000002_link_crm_query_catalog.rs
  • src/backend/services/analytics/src/migration/m20260609_000002_seed_chatgpt_team_metrics_catalog.rs
  • src/backend/services/analytics/src/migration/m20260612_000002_seed_support_catalog.rs
  • src/backend/services/analytics/src/migration/m20260612_000003_link_support_query_catalog.rs
  • src/backend/services/analytics/src/migration/m20260618_000002_seed_claude_team_overage_catalog.rs
  • src/backend/services/analytics/src/migration/m20260620_000002_seed_wiki_catalog.rs
  • src/backend/services/analytics/src/migration/m20260623_000002_seed_ai_personal_metric_catalog.rs
  • src/backend/services/analytics/src/migration/m20260624_000002_seed_zulip_collab_catalog.rs
  • src/backend/services/analytics/src/migration/m20260702_000002_seed_collab_messaging_catalog.rs
  • src/backend/services/identity-resolution/src/infra/db/bootstrap.rs
  • src/backend/services/identity-resolution/src/infra/db/mod.rs
  • src/backend/services/identity-resolution/src/infra/db/ops_repo.rs
  • src/backend/services/identity-resolution/src/infra/db/person_roles_repo.rs
  • src/backend/services/identity-resolution/src/infra/db/persons_repo.rs
  • src/backend/services/identity-resolution/src/infra/db/resolution_repo.rs
  • src/backend/services/identity-resolution/src/infra/db/roles_repo.rs
  • src/backend/services/identity-resolution/src/infra/db/seed_repo.rs
  • src/backend/services/identity-resolution/src/infra/db/subchart_repo.rs
  • src/backend/services/identity-resolution/src/infra/db/test_fixture.rs
  • src/backend/services/identity-resolution/src/infra/db/visibility_repo.rs

📝 Walkthrough

Walkthrough

SeaORM and SeaORM migration dependencies were upgraded to 2.0. Analytics and identity-resolution database operations now use raw query and execution APIs. UUID byte bindings now use direct vectors. Existing SQL, control flow, and result handling remain unchanged.

Changes

SeaORM 2.0 compatibility migration

Layer / File(s) Summary
Analytics runtime database calls
src/backend/services/analytics/src/domain/..., src/backend/services/analytics/src/infra/..., src/backend/Cargo.toml
Analytics operations, repositories, seeds, fixtures, and tests use execute_raw, query_one_raw, and direct UUID byte values. SeaORM dependencies use version 2.0.
Analytics migration execution
src/backend/services/analytics/src/migration/*
Catalog seed and link migrations use execute_raw. UUID parameters use direct byte vectors.
Identity-resolution database calls
src/backend/services/identity-resolution/src/infra/db/*
Bootstrap logic, advisory locks, repositories, transactions, fixtures, and tests use raw SeaORM query and execution methods.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: mozhaev-dev, aleksdotbar

🚥 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 clearly and concisely describes the primary change: upgrading the SeaORM dependencies to version 2.0.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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

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.

@aleksdotbar
aleksdotbar added this pull request to the merge queue Aug 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 17, 2026
@aleksdotbar
aleksdotbar added this pull request to the merge queue Aug 17, 2026
@aleksdotbar
aleksdotbar removed this pull request from the merge queue due to a manual request Aug 17, 2026
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