Skip to content
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

Fix interrupt to support a timeout and handle crashes #3614

Merged
merged 15 commits into from
Dec 10, 2018

Conversation

rchiodo
Copy link

@rchiodo rchiodo commented Dec 10, 2018

For #3511

Also did some work around making sure cancel behaves correctly. Cancelling a connection happens on exporting a file and running all cells. There was a bug where the cancel token from one request was being reused in another.

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Has a news entry file (remember to thank yourself!)
  • Unit tests & system/integration tests are added/updated
  • Test plan is updated as appropriate
  • package-lock.json has been regenerated by running npm install (if dependencies have changed)

Copy link
Member

@IanMatthewHuff IanMatthewHuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

src/client/common/cancellation.ts Show resolved Hide resolved
.catch(err => {
status.dispose();
Copy link

@DonJayamanne DonJayamanne Dec 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to notify the user? #Resolved

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we probably should.


In reply to: 240363877 [](ancestors = 240363877)

src/client/datascience/jupyterConnection.ts Outdated Show resolved Hide resolved
if (this.specFile &&
IsGuidRegEx.test(path.basename(path.dirname(this.specFile)))) {
try {
fs.removeSync(path.dirname(this.specFile));
Copy link

@DonJayamanne DonJayamanne Dec 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this async. #Resolved

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can't be. The dispose can't return anything.


In reply to: 240364388 [](ancestors = 240364388)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I could just ignore errors on it.


In reply to: 240369636 [](ancestors = 240369636,240364388)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can't be. The dispose can't return anything.

A number of async dispose methods already exist in DS code, how is this any different?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must always avoid sync operations. Specially here, perfoming I/O operations in dispose slows down overall dispose method time.

src/test/datascience/notebook.functional.test.ts Outdated Show resolved Hide resolved
@rchiodo rchiodo merged commit 874b116 into master Dec 10, 2018
@rchiodo rchiodo deleted the rchiodo/fix_interrupt branch December 10, 2018 22:49
@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants