Conversation
OrdiNeu
approved these changes
Dec 2, 2025
Comment on lines
+579
to
+583
| new_variantfile = session.query(VariantFile).filter_by(id=variantfile_id).one_or_none() | ||
| if new_variantfile is not None: | ||
| new_variantfile.indexed = 1 | ||
| session.add(new_variantfile) | ||
| session.commit() |
Contributor
There was a problem hiding this comment.
If the new variantfile doesn't exist in the database, should it create a new entry?
Member
Author
There was a problem hiding this comment.
I don't think so: this is actually the second time we look up a variantfile in this method; the first time is at the top, and that time it returns None:
if new_variantfile is None:
logger.debug(f"couldn't find variantfile {variantfile_id}")
return None # we can't work on nonexistent variantfiles
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.
If you run a genomic query, part of the query operation tries to look up every drs object ID as if it is an experiment. This is a separate problem that I need to work on for https://candig.atlassian.net/browse/DIG-2136. However, because it is doing all of these erroneous htsget lookups, it is causing a 500 error because I didn't catch the "this object is valid but not an experiment" case correctly. This PR fixes that.
It also makes sure that the indexed flag gets set in the variantfile database; I thought it was but I guess I missed it?
This is currently deployed on UHN-prod and indexing seems to be going fine there now.