-
Notifications
You must be signed in to change notification settings - Fork 76
Database Tools #2806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Database Tools #2806
Conversation
How to use the Graphite Merge QueueAdd the label mergequeue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
|
Claude finished @codabrink's task —— View job PR Review - Database ToolsReview completed: December 8, 2025 at 21:58 UTC Architecture & DesignPositive:
Issues:
Security & Input Validation
Performance
Error Handling
Test CoverageGood coverage for critical paths:
Missing coverage:
Codecov shows 0.82% patch coverage with 240 lines missing. This is extremely low and concerning for production tooling that performs destructive operations. Code Quality
Suggestions (Not Critical)
SummaryThis is a useful internal tool with solid architecture. The main concerns are:
The existing bot reviews have caught most of the detailed implementation issues. Focus on improving test coverage and ensuring this runs in CI. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2806 +/- ##
==========================================
- Coverage 74.36% 74.28% -0.09%
==========================================
Files 376 388 +12
Lines 48819 49834 +1015
==========================================
+ Hits 36305 37019 +714
- Misses 12514 12815 +301 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add a
|
8122e1b to
94f11f5
Compare
| .revert_last_migration(xmtp_db::MIGRATIONS) | ||
| .map_err(DieselError::QueryBuilderError)) | ||
| }); | ||
| if let Err(err) = result { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rollback loop can spin forever on a revert failure. We log the error and continue, so applied_migrations(conn)?.first() keeps returning the same version and we retry endlessly. Consider breaking (or returning the error) when revert_last_migration fails to avoid an infinite loop.
- if let Err(err) = result {
- tracing::warn!("{err:?}");
- } else {
+ if let Err(err) = result {
+ tracing::warn!("{err:?}");
+ break;
+ } else {
info!("Reverted {version}");
- }
+ }
🚀 Reply to ask Macroscope to explain or update this suggestion.
👍 Helpful? React to give us feedback.
Creates a tool to allow database management of xmtp instances.