-
Notifications
You must be signed in to change notification settings - Fork 317
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
Timeout configuration in validation and error message #1730
Conversation
b5e50f9
to
c3176fb
Compare
I see that #1690 implements timeout configuration like this, but better. The validate part of this pr is still worth considering in my opinion. I can force-push to keep only that part if requested |
The commit above makes |
Different behavior on Windows? I can try to get a machine to take a closer look, but that might not happen soon. |
I don't exactly understand the details, but the Windows errors were seemingly caused by timeout being set too short. Setting it to 2 seconds is fine, but when it is only 1, my guess is that the kernel gets cancelled too fast for |
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.
Thanks @tuncbkose, LGTM.
I just have a comment below.
4ef9447
to
6ebc18b
Compare
The nbextensions failures seem to be related to the new selenium version deprecating |
Rebased for testing fixes |
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.
Thanks, LGTM.
I only have some prettier suggestions.
Thank you! Will amend these suggestions in a bit. |
* Fix setting of cell execution timeout in validation * Make timeout error configurable and visible to users * Added tests for timeout configuration
Make timeout configuration work via:c.Execute.timeout
orc.ExecutePreprocessor.timeout
innbgrader_config.py
or,--Execute.timeout
or--ExecutePreprocessor.timeout
in the command-line.Since #1690 is now merged, this pr also makes
error_on_timeout
configurable and makes it actually printed on command line or included in Notebook/Lab response messages.In the case of validating, the current implementation does not use configuration in the way
traitlets
expects, in that it just callspreprocessor({"timeout": x})
, which is caught byExecutePreprocessor
(this may work, but only by accident). By giving the argumentparent=self
, the configuration is deferred to the initialization ofConfigurable
, which knows how to do it properly.