-
Notifications
You must be signed in to change notification settings - Fork 10
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
DM-30046: Defer reading refcats in forcedPhotCcd #177
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
Question more than a comment - will we get here only if refCats is an empty list? Would it ever be the case where refCats have empty tables, in which case this might still have to be raised? Sure, it wasn't raised earlier, but just wondering.
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.
Ah, reading it I think you're right, if all records are empty we wouldn't raise. I'm never quite sure what happens with empty things in general, and the best to handle it in particular. From what I gathered at discussions following DM-29862, I'm not sure there really is a standard way of dealing with such cases yet.
As you say, we never raised before anyway; this addition was just Jim figuring we might as well throw a clearer exception since we needed to change the way we handled
mergedRefCat
. I'm going to go ahead and merge - I'm sure we can live with postponing handling the case of empty-only records until after this weekly gets tagged :)Thanks for the instantaneous review, Arun!
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.
If
refCats
was empty, then line 398 before would have thrown anIndexError
. Now, we make it throw aRuntimeError
. I'm betting this doesn't make any difference, unless the file calling this was catching specific exceptions in which case that would have to be changed as well. Just wanted to point that out here.