fix warning about chain DB migration in bootstrap#1062
Conversation
Signed-off-by: Roland Kuhn <rk@rkuhn.info>
Signed-off-by: Roland Kuhn <rk@rkuhn.info>
WalkthroughBootstrap now refuses to overwrite existing chain or ledger directories, removes the ChangesBootstrap safety and database initialization
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/amaru/src/bin/amaru/cmd/node/bootstrap.rs (1)
17-20: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReorder imports to group external crates before workspace crates.
G'day mate! What's the craic? Looks like the import order got a wee bit scrambled here. Just like trying to organize your inventory in Resident Evil 4, we gotta slot the items in the exact right spot to keep things tidy!
As per the coding guidelines, imports must follow the order:
std, external crates, workspace/project crates, and finallyself/super/crate.clapis an external crate, so it should sit right above theamaru*workspace imports. Defo an easy fix to keep the codebase lookin' fresh.📦 Proposed import reordering
-use amaru::{bootstrap::bootstrap, default_chain_dir, default_ledger_dir}; -use amaru_kernel::{Epoch, GlobalParameters, NetworkName, utils::path::relative_path}; -use amaru_observability::{info, warn}; -use clap::Parser; +use clap::Parser; + +use amaru::{bootstrap::bootstrap, default_chain_dir, default_ledger_dir}; +use amaru_kernel::{Epoch, GlobalParameters, NetworkName, utils::path::relative_path}; +use amaru_observability::{info, warn};🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/amaru/src/bin/amaru/cmd/node/bootstrap.rs` around lines 17 - 20, Reorder the imports so the external crate import `use clap::Parser;` appears before the workspace imports from `amaru`, `amaru_kernel`, and `amaru_observability`, preserving the existing imports and grouping order.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@crates/amaru/src/bin/amaru/cmd/node/bootstrap.rs`:
- Around line 17-20: Reorder the imports so the external crate import `use
clap::Parser;` appears before the workspace imports from `amaru`,
`amaru_kernel`, and `amaru_observability`, preserving the existing imports and
grouping order.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 837c39a0-1096-4419-9665-fd5db91cfe16
📒 Files selected for processing (11)
.github/workflows/publish-bootstrap-snapshots.ymlCHANGELOG.mdcrates/amaru-observability/src/schemas.rscrates/amaru-stores/src/rocksdb/consensus/rocksdb_store.rscrates/amaru-stores/src/rocksdb/consensus/tests.rscrates/amaru/src/bin/amaru/cmd/node/bootstrap.rscrates/amaru/src/bootstrap/mod.rsdocs/TRACES.mddocs/traces-schema.jsonengineering-decision-records/017-version-and-migrate-db.mdscripts/refresh-from-mithril
💤 Files with no reviewable changes (3)
- .github/workflows/publish-bootstrap-snapshots.yml
- crates/amaru-observability/src/schemas.rs
- docs/traces-schema.json
fixes #1060
also removes
--forceoption as per EDR 19Summary by CodeRabbit
Breaking Changes
--forceoption from node bootstrap and snapshot creation commands.Bug Fixes
Documentation