Skip to content

feat(mono):add base_storage to handle common logic#1212

Merged
genedna merged 3 commits into
gitmono-dev:mainfrom
benjamin-747:main
Jul 10, 2025
Merged

feat(mono):add base_storage to handle common logic#1212
genedna merged 3 commits into
gitmono-dev:mainfrom
benjamin-747:main

Conversation

@benjamin-747

Copy link
Copy Markdown
Collaborator

No description provided.

@vercel

vercel Bot commented Jul 10, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega 🛑 Canceled (Inspect) Jul 10, 2025 8:00am

@benjamin-747 benjamin-747 changed the title feat(mono):add base_storage to handle common options feat(mono):add base_storage to handle common logic Jul 10, 2025
@benjamin-747
benjamin-747 requested a review from genedna July 10, 2025 06:19
@genedna
genedna requested a review from Copilot July 10, 2025 06:53

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a BaseStorage and StorageConnector trait to centralize common database logic, refactors all existing storage modules to embed BaseStorage via Deref, and updates dependent code in both Jupiter and Ceres to use the new batch_save_model API.

  • Add BaseStorage/StorageConnector with batch_save_model implementation.
  • Refactor each *Storage struct to hold a BaseStorage and implement Deref.
  • Update consumers (tests, LFS init, Ceres import and API service) to use the trait-based batch API.

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
mercury/src/errors.rs Add conversion from MegaError to GitError
jupiter/src/tests.rs Switch tests to use BaseStorage; commented out old instantiation
jupiter/src/storage/base_storage.rs Introduce BaseStorage and StorageConnector with batch logic
jupiter/src/storage/* Refactor all storage modules to embed BaseStorage and implement Deref
jupiter/src/storage/mod.rs Update Service/Storage to build from BaseStorage
jupiter/src/lfs_storage/mod.rs Change LFS init signature to accept raw DatabaseConnection
jupiter/src/lfs_storage/local_storage.rs Update LocalStorage to construct LfsDbStorage from BaseStorage
ceres/src/pack/import_repo.rs Replace free-function batch_save_model calls with trait method
ceres/src/api_service/mono_api_service.rs Same update in the Mono API service

Comment thread ceres/src/pack/import_repo.rs
Comment thread ceres/src/api_service/mono_api_service.rs
Comment thread jupiter/src/tests.rs
@genedna
genedna enabled auto-merge July 10, 2025 08:27
@genedna
genedna added this pull request to the merge queue Jul 10, 2025
Merged via the queue into gitmono-dev:main with commit abeeedf Jul 10, 2025
9 of 11 checks passed
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