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

Do not run visualizations on InterruptedException #11250

Merged
merged 4 commits into from
Oct 7, 2024

Conversation

hubertp
Copy link
Contributor

@hubertp hubertp commented Oct 3, 2024

Pull Request Description

There is no point in running visualization for the expression value that is InterruptedException. The latter is likely to bubble up the exception or create erroneous value that will be confusing to the user.

Important Notes

Closes #11243 and partially addresses some of the symptomes of #11084.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

There is no point in running visualization for the expression value that
is InterruptedException. The latter is likely to bubble up the exception
or create one that will be confusing to the user.

Closes #11243 and partially addresses some of the symptomes of #11084.
@hubertp hubertp added the CI: No changelog needed Do not require a changelog entry for this PR. label Oct 3, 2024
@hubertp hubertp changed the title Do not run visualizations on InterruptException Do not run visualizations on InterruptedException Oct 3, 2024
return false;
}
}

Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to introduce new isInterruptedExceptionValue method? Isn't it easier to change the argument of existing isInterruptedException to Object?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instance check didn't feel right, hence another method. But I don't have a preference tbh.

Copy link
Member

Choose a reason for hiding this comment

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

There is no need to perform an instance check. isInterruptedException(Object ex, InteropLibrary iop) accepts Object.

Previously a visualization failure would be reported:
```
Method `+` of type sleep interrupted could not be found.
```
@hubertp hubertp added the CI: Ready to merge This PR is eligible for automatic merge label Oct 6, 2024
@hubertp hubertp merged commit 9429a45 into develop Oct 7, 2024
40 of 41 checks passed
@hubertp hubertp deleted the wip/hubert/11084-visualizations-on-interrupts branch October 7, 2024 10:29
jdunkerley pushed a commit that referenced this pull request Oct 7, 2024
* Do not run visualizations on InterruptException

There is no point in running visualization for the expression value that
is InterruptedException. The latter is likely to bubble up the exception
or create one that will be confusing to the user.

Closes #11243 and partially addresses some of the symptomes of #11084.

* Add a test for confusing visualization failures

Previously a visualization failure would be reported:
```
Method `+` of type sleep interrupted could not be found.
```

* PR review

Nit

(cherry picked from commit 9429a45)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thread interruption may happen while constructing a log message
2 participants