Add row limit to lookup table uploads #35426
Open
+65
−26
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.
Product Description
Technical Summary
https://dimagi.atlassian.net/browse/SAAS-16223
As discussed in the ticket, there aren't any existing lookup tables with more than 500k rows, so that seems like a very safe limit to start with. The risky part of this PR is that it adds an explicit limit to the WorkbookJSONReader class, currently set to 1 million. This limit doesn't have to be set to anything necessarily, but I figured in the spirit of implementing limits, putting a limit like this in code seems ideal. On the flip side, it could be viewed as a lazy way of adding a limit to any code that uses this class under the hood (like scheduling).
Feature Flag
Safety Assurance
Safety story
Automated test coverage
QA Plan
No
Rollback instructions
Labels & Review