-
Notifications
You must be signed in to change notification settings - Fork 117
[feat] Improve handling of user programming errors #2087
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
[feat] Improve handling of user programming errors #2087
Conversation
|
Hello @vkarak, Thank you for updating! Cheers! There are no PEP8 issues in this Pull Request!Do see the ReFrame Coding Style Guide Comment last updated at 2021-07-30 21:11:41 UTC |
Codecov Report
@@ Coverage Diff @@
## master #2087 +/- ##
==========================================
+ Coverage 86.26% 86.30% +0.03%
==========================================
Files 53 53
Lines 9347 9352 +5
==========================================
+ Hits 8063 8071 +8
+ Misses 1284 1281 -3
Continue to review full report at Codecov.
|
ekouts
left a 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.
Lgtm
|
@vakak should the documentation and the reference manual be also updated regarding the deprecation of |
|
@teojgo Good catch, thanks! |
victorusu
left a 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.
lgtm
jjotero
left a 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.
I think we should create 2 issues from this PR then:
- Making the loader smarter and catching all the potential metaclass errors.
- Create the rationale in the docs.
|
I just realised that I need to update the tips and tricks tutorial about debugging. It even has an implicit reference to the |
What do you mean here? Currently, it catches what it needs to, since metaclasses throw
I think this should be an internal documentation. In the documentation ("Tips & Tricks" tutorial) I have the following now: |
This PR improves the handling of user programming errors in ReFrame. Generally, I can see three broad categories of user errors:
NameError,AttributeError,ValueErrorandTypeError.ValueErrors raised by aTypedField.Errors in (1) and (2) can be tracked back to user test line that triggered them, whereas errors in (3) cannot. So a user programming error can be defined as one of the error types in (1) and if the frame that triggered it is in the "user space." In these cases, we simply print the error message and its source context and continue by skipping the offending test. For the category (3), we can't do that, because we can't differentiate whether a
ValueErrororAttributeErroris actually a user programming error or a bug. So for these type of errors, we raiseReframeSyntaxError, which is treated as a soft error, i.e., print the error message (without source context obviously, but showing the test that is being created) and skip the test. In all cases, the users can use-vto get the full stack trace.This PR also deactivates and deprecates the
--ignore-check-conflicts. It had practically no effect other than not stopping the loading of tests. Currently, if a duplicate test is loaded, it is simply ignored with a warning message.Fixes #1899.