-
Notifications
You must be signed in to change notification settings - Fork 915
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
Remove macros that inspect the contents of exceptions #12076
Remove macros that inspect the contents of exceptions #12076
Conversation
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.
For all the cases where the message is being removed and lacks context, we should retain an inline code comment that copies the message. That helps explain to readers what is happening in the test and why the error is supposed to occur.
Note that @codereport had started a similar thing a while back #10637 |
He started out the removal of parsing exceptions in Python and removing these C++ macros from tests was identified as a task in that PR, but it is out of scope for that PR. I've isolated just that change here without touching cases where Python is actually using these right now. I'll address those separately. |
Codecov ReportBase: 87.47% // Head: 88.05% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## branch-22.12 #12076 +/- ##
================================================
+ Coverage 87.47% 88.05% +0.57%
================================================
Files 133 135 +2
Lines 21826 22025 +199
================================================
+ Hits 19093 19394 +301
+ Misses 2733 2631 -102
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. |
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.
Support this work. Many times I had issue with fixing failed tests due to the error messages.
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.
I liked how you turned the message text into a comment in the tests so that information is not lost.
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.
A couple minor suggestions, feel free to accept or reject.
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.
LGTM 👍
The number of expect message throws, are much less than I expected.
@gpucibot merge |
This PR removes support for checking exception messages from `assert_exceptions_equal`. See #12076 for the same change made in C++, #10200 for more context, and #7917 for the change in cudf Python's developer documentation where we officially changed our policy to not consider exception payloads part of the stable API. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Ashwin Srinath (https://github.com/shwina) URL: #12424
Description
We should not be encouraging users to rely specific error messages. Anywhere that is currently doing so is likely an indication that libcudf should be throwing a more specific type of exception instead of just a
cudf::logic_error
. This PR removes the testing utilities that were previously used for this purpose and reworks the relevant tests.Related to #10200.
Checklist