-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Add row limit to lookup table uploads #35426
Conversation
I think I actually want to replace the implementation of |
Just kidding. After reading some source code I realized the dimensions weren't going to work the way I had hoped, though there is some room for a deeper optimization. My understanding is that dimensions are unreliably set depending on the application that created the file in the first place. So we could rework our code to check for the total size of the workbook/worksheet when first loading it, using the dimensions if they are set, otherwise manually iterating over rows, whereas we currently just iterate over all rows to determine table sizes. Update for clarity: For now, just using the existing |
Missed Graham's most recent comment. Sounds like this will not work and is incomlete.
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.
Just kidding. 😄 Apparently this is complete.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
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