-
Notifications
You must be signed in to change notification settings - Fork 203
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
checksums.json
support clutters log with false crash messages
#4301
Comments
🤔 Could you be more specific on which recipe crashes and what file it is attempting to download ? I doubt that the PR made almost every build fail (otherwise it would not have been merged) |
Oh sorry for the confusion, the build is not crashing but the log contains the message "EasyBuild crashed with an error" because almost no ECs have a matching |
🤔 if that exception does not make it crash (because it is then handled by the caller), why is it logged at all ? The |
Because EasyBuildError logs that message on construction. I.e. at that point it is not known if it is caught. This turns up in other situations too |
@Flamefire The problem you're reporting is a very valid one, there should be no scary-looking " It's being fixed in #4261, by letting |
I see, so #4261 implements the alternative approach I suggested above. However there are a dozen other instances where we catch this error (still logging the scary message) as identified by So maybe we want to change that log-on-construction logic anyway. |
@Flamefire This was closed because the exact issue being reported here was fixed by #4261 Let's open a dedicated issue for coming up with a good way to prevent errors that should just be warnings from appearing in the log file. |
Since #3749 introduced support for
checksums.json
the log will now contain the following highly misleading error on almost every build:I recently got this from another admin who is debugging a failure and thought this is the first error, which is understandable given the message "EasyBuild crashed with an error" which is clearly wrong at this point: The failure is very much expected.
So
EasyBuildError
should not log anything on construction because it might be caught invalidating the logged message.I found
sys.excepthook
which is called for unhandled exceptions which is likely a better place for logging the exception then logging every (such) exception on creation even if it is caught and handled as part of an expected code path.Alternative: Let
obtain_file
returnNone
in case the file was not found, maybe based on a parameterexpect_success
for backwards compatibility.CC @mboisson
The text was updated successfully, but these errors were encountered: