-
Notifications
You must be signed in to change notification settings - Fork 81
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
MRG: panic when FSStorage::load_sig
encounters more than one Signature
in a JSON record
#3333
Open
ctb
wants to merge
50
commits into
latest
Choose a base branch
from
debug_multisigfile
base: latest
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## latest #3333 +/- ##
==========================================
- Coverage 86.47% 86.47% -0.01%
==========================================
Files 137 137
Lines 16086 16090 +4
Branches 2219 2219
==========================================
+ Hits 13911 13914 +3
- Misses 1868 1869 +1
Partials 307 307
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ctb
changed the title
EXP: debug multisigfile loading
WIP: explicitly note that loading more than one Oct 27, 2024
Signature
from a .sig file is unimplemented currently
ctb
changed the title
WIP: explicitly note that loading more than one
WIP: panic when Oct 27, 2024
Signature
from a .sig file is unimplemented currentlyFSStorage::load_sig
encounters more than one Signature
in a JSON record
@luizirber @bluegenes thoughts welcome! |
ctb
changed the title
WIP: panic when
MRG: panic when Oct 27, 2024
FSStorage::load_sig
encounters more than one Signature
in a JSON recordFSStorage::load_sig
encounters more than one Signature
in a JSON record
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.
This PR was originally about debugging sourmash-bio/sourmash_plugin_branchwater#445, but that's going to require more work to fix properly. For now, I would like to nominate it for merge because sourmash fails silently in this situation, and that's Bad.
In brief, the main thing this PR does is panic with an
unimplemented!
whenFSStorage::load_sig
encounters more than oneSignature
in a JSON record.This PR also adds a bit of documentation to
InnerStorage
, per the bottom of this comment.The problem at hand: when loading a
SigStore
/Signature
from aStorage
, sourmash only loads the first one and ignores any others.sourmash/src/core/src/storage/mod.rs
Lines 34 to 38 in 26b50f3
This results from the concept of a
Signature
as containing one or more sketches; the history of this is described here, and it leads to some interesting silliness in the Python layer.The contrapositive is that, in Rust, a single
Signature
can include multiple sketches, e.g. with different ksizes. So this works fine for the wort case where we have a single.sig
file with k=21, k=31, k51.Note that the Python layer (and hence the entire sourmash CLI) fully supports multiple
Signature
s in JSON: this is well tested and well covered behavior. The branchwater plugin runs into it because it is using the Rust layer and the API is not fully fleshed out there.