Repository navigation
Upload: a .vcf that isn't a readable VCF no longer returns a 500 (#2938) - #2939
Merged
Merged
Conversation
…r sniffer, like the gene-level CNV and SpliceGirl ones, treats a file it can't read as someone else's, so the VCF import fails and upload_status reports it #2938
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.
🤖 Written by Claude
For #2938.
Every factory for an uploaded file's extension is asked whether it can process it, and the ClinVar one opened every
.vcfwith cyvcf2 without catching a parse failure. So any.vcfthat isn't a readable VCF made both the upload API and the web upload return a 500. It now handles that the way the gene-level CNV and SpliceGirl sniffers already do. The file is claimed as a VCF, its import pipeline fails reading the header, andupload_statusreports the error, as it does for other malformed files.Test:
upload.tests.test_api.UploadFileAPITest.test_unreadable_vcf_is_accepted_as_a_vcffails on master with a 500 and passes here.upload,annotationandseqautotests pass (1084).