-
Notifications
You must be signed in to change notification settings - Fork 274
fix: version not found during pruning (backport release/v4) #1858
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
fix: version not found during pruning (backport release/v4) #1858
Conversation
WalkthroughPins github.com/cosmos/iavl to v1.2.6 in go.mod and gomod2nix.toml (including updated hash and replace metadata) and adds an UNRELEASED CHANGELOG entry noting a pruning-related bug fix reference. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (2)
go.mod (1)
302-304: Add a small regression test exercising pruning around a missing version.This change fixes a production bug-path; please add a test that reproduces the “version does not exist” scenario and passes with v1.2.6 to prevent regressions.
I can sketch a minimal test that populates a tree with versions, prunes a range including a recent version, and asserts subsequent LoadVersion/Commit behavior succeeds. Want me to open a follow-up PR with that?
CHANGELOG.md (1)
22-25: Make the entry explicit about the dependency pin and symptom.Consider clarifying that the fix is delivered by pinning iavl to v1.2.6, and echo the user-facing symptom to help operators scanning the log.
Apply this diff to improve the bullet:
- * [#1858](https://github.com/crypto-org-chain/cronos/pull/1858) Fix version not found during pruning. + * [#1858](https://github.com/crypto-org-chain/cronos/pull/1858) deps(iavl): pin to v1.2.6 to fix pruning error “version does not exist”.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (3)
CHANGELOG.md(1 hunks)go.mod(1 hunks)gomod2nix.toml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
- GitHub Check: build (macos-latest)
- GitHub Check: build (macos-14)
- GitHub Check: build (ubuntu-latest)
- GitHub Check: unittest
- GitHub Check: gomod2nix
- GitHub Check: integration_tests (slow)
- GitHub Check: integration_tests (gas)
- GitHub Check: integration_tests (gov)
- GitHub Check: integration_tests (ibc)
- GitHub Check: integration_tests (ibc_rly_gas)
- GitHub Check: integration_tests (upgrade)
- GitHub Check: integration_tests (ibc_update_client)
- GitHub Check: integration_tests (ica)
- GitHub Check: integration_tests (ibc_timeout)
- GitHub Check: integration_tests (ibc_rly_evm)
- GitHub Check: integration_tests (unmarked)
- GitHub Check: Run golangci-lint
🔇 Additional comments (3)
go.mod (1)
302-304: LGTM: Pinning iavl to v1.2.6 to address pruning “version does not exist”.The targeted replace is scoped and low risk; good call pinning to a known-good upstream for this bug.
gomod2nix.toml (2)
232-234: LGTM: gomod2nix pinned to iavl v1.2.6 with updated checksum and replaced marker.The Nix metadata mirrors go.mod; this keeps CI/builds reproducible across environments.
232-234: Confirm gomod2nix iavl hash correctnessPlease ensure the
sha256value for thegithub.zerozr99.workers.dev/cosmos/iavlmodule matches the output of thegomod2nix generatetool. If this stanza was edited by hand (rather than produced by the generator), rerun the tool to prevent checksum drift.Locations to verify:
gomod2nix.toml, lines 231–234Current block:
[mod."github.com/cosmos/iavl"] version = "v1.2.6" hash = "sha256-9kLtVepU5b3m2Sne8pBQNvF9LxM374LEmvuLWeYBfFU=" replaced = "github.com/cosmos/iavl"If these values weren’t generated by running:
nix develop -c gomod2nix generate # or: nix run .#gomod2nix -- generateplease do so and commit the updated hash output.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1858 +/- ##
===========================================
+ Coverage 16.87% 35.81% +18.94%
===========================================
Files 72 127 +55
Lines 6163 11812 +5649
===========================================
+ Hits 1040 4231 +3191
- Misses 5000 7158 +2158
- Partials 123 423 +300 🚀 New features to boost your workflow:
|
JayT106
left a comment
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.
LGTM
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make)make test)go fmt)golangci-lint run)go list -json -m all | nancy sleuth)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit