Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the file-backed DB constructor and related tests to address a flaky/racy pipeline failure in storage/filedb by changing filesystem initialization behavior and updating tests/helpers.
Changes:
- Make
NewDBrespect an injectedafero.Fs(only default to OS FS when none is provided). - Update several DB error-path tests to stop injecting an in-memory FS.
- Fix typo in
lastConsequetiveNilIndexhelper name in RangeDB tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
storage/filedb/db.go |
Makes default filesystem initialization conditional on db.fs being unset. |
storage/filedb/db_test.go |
Updates error-case tests to rely on OS filesystem behavior under /etc. |
storage/filedb/range_db_test.go |
Renames a helper to correct spelling (Consequetive → Consecutive). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3087 +/- ##
=======================================
Coverage 60.42% 60.43%
=======================================
Files 367 367
Lines 18694 18697 +3
=======================================
+ Hits 11296 11299 +3
Misses 6454 6454
Partials 944 944
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes this failing pipeline:
https://github.com/berachain/beacon-kit/actions/runs/24676377991/job/72161386938?pr=3086
TestRangeDB_Invariants/Prune_from_populatedfailing with"Index 1 should have been pruned"because of test isolation breakage