-
Notifications
You must be signed in to change notification settings - Fork 78
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
Adding custom exception when cache insert fails because of too many columns #749
Adding custom exception when cache insert fails because of too many columns #749
Conversation
Codecov ReportBase: 90.08% // Head: 92.00% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #749 +/- ##
==========================================
+ Coverage 90.08% 92.00% +1.91%
==========================================
Files 99 33 -66
Lines 4943 2238 -2705
==========================================
- Hits 4453 2059 -2394
+ Misses 490 179 -311
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Thanks! That's not really what I had in mind. I thought we could instead add a new env var to set the maximum number of columns (features) supported in /first-rows, and check this early in the function (as soon as we have the features), and then raise if the number of features is above the limit. Then, once deployed in prod, we refresh the /first-rows endpoint for the affected datasets -> they should now have this error, which is more explicit. |
Got it, it will first validate if the amount of columns exceeded the limit but what if even having a less number of columns but the content without rows is also too long that exceeds the rows_max_bytes? I think another kind of error could be thrown for now or just leave it as it is as unexpectederror |
Yes, two cases are missing:
|
9a3cfd0
to
f5a64b4
Compare
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.
Good!
I made a lot of small comments, as it's one of your first PR.
In particular, I tried to make the error messages a bit more explicit for the end users, since it will be shown in the dataset viewer.
workers/datasets_based/src/datasets_based/workers/first_rows.py
Outdated
Show resolved
Hide resolved
workers/datasets_based/src/datasets_based/workers/first_rows.py
Outdated
Show resolved
Hide resolved
workers/datasets_based/src/datasets_based/workers/first_rows.py
Outdated
Show resolved
Hide resolved
workers/datasets_based/src/datasets_based/workers/first_rows.py
Outdated
Show resolved
Hide resolved
workers/datasets_based/src/datasets_based/workers/first_rows.py
Outdated
Show resolved
Hide resolved
workers/datasets_based/src/datasets_based/workers/first_rows.py
Outdated
Show resolved
Hide resolved
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.
Cool ! Just one comment:
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.
Awesome thanks !
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 details. Feel free to merge once fixed. Thanks!!!
workers/datasets_based/src/datasets_based/workers/first_rows.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Sylvain Lesage <severo@rednegra.net>
Co-authored-by: Sylvain Lesage <severo@rednegra.net>
Co-authored-by: Sylvain Lesage <severo@rednegra.net>
Co-authored-by: Sylvain Lesage <severo@rednegra.net>
Co-authored-by: Sylvain Lesage <severo@rednegra.net>
Co-authored-by: Sylvain Lesage <severo@rednegra.net>
Co-authored-by: Sylvain Lesage <severo@rednegra.net>
Co-authored-by: Sylvain Lesage <severo@rednegra.net>
Co-authored-by: Sylvain Lesage <severo@rednegra.net>
Co-authored-by: Sylvain Lesage <severo@rednegra.net>
ee34b95
to
a89f65e
Compare
Adding custom exception to fix scenarios like #731