Re-introduce #539, fix abort to not abort non-execute requests #572
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #571
As described in the original issue (#539), the old
stop_on_error_timeout
functionality didn't actually work asynchronously, and would cause new requests to block until the error was finished. The PR #539 fixed this to work async without changing any of the other logic.This caused occasional issues in other libraries that depend on the
kernel_info
request, when the notebook had cells with python errors in them due to the race condition of sending off the request.This new PR re-introduces the async
stop_on_error_timeout
fix, but changes the logic to abort /only/execute_request
's. This means that running multiple cells in a row where the first cell has an error will still cause the remaining cell executions to abort, but you can still continue to do things likekernel_info
,inspect
,completions
, etc.It also adds a couple of tests for those.
Also tested against papermill in nteract/papermill#519 to verify that the fix allows papermill to still function.