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 drop unhandled exceptions in Python #3170

Merged
merged 1 commit into from
Sep 6, 2019
Merged

Conversation

pgavlin
Copy link
Member

@pgavlin pgavlin commented Sep 3, 2019

  • Do not use a non-zero-to-zero transition in the number of outstanding
    RPCs to determine the completion of a Python program until after the
    synchronous piece of the program has finished running is complete
  • Instead of using a future to indicate that either a) a zero-to-one
    transition in the number of outstanding RPCs has occurred, or b) an
    unhandled exception has occurred, a) observe the transition itself,
    and b) use an optional exception field to track the presence or
    absence of an exception.

Fixes #3162.

@lukehoban
Copy link
Member

Can we add test coverage of key scenarios here?

@pgavlin
Copy link
Member Author

pgavlin commented Sep 3, 2019

Can we add test coverage of key scenarios here?

Yep—working on that now.

- Do not use a non-zero-to-zero transition in the number of outstanding
  RPCs to determine the completion of a Python program until after the
  synchronous piece of the program has finished running is complete
- Instead of using a future to indicate that either a) a zero-to-one
  transition in the number of outstanding RPCs has occurred, or b) an
  unhandled exception has occurred, a) observe the transition itself,
  and b) use an optional exception field to track the presence or
  absence of an exception.

Fixes #3162.
@pgavlin pgavlin changed the title WIP: do not drop unhandled exceptions in Python Do not drop unhandled exceptions in Python Sep 5, 2019
Copy link
Contributor

@ellismg ellismg left a comment

Choose a reason for hiding this comment

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

LGTM

@pgavlin pgavlin merged commit 48c8ea1 into master Sep 6, 2019
@pulumi-bot pulumi-bot deleted the pgavlin/pythonException branch September 6, 2019 20:53
lukehoban pushed a commit that referenced this pull request Sep 7, 2019
- Do not use a non-zero-to-zero transition in the number of outstanding
  RPCs to determine the completion of a Python program until after the
  synchronous piece of the program has finished running is complete
- Instead of using a future to indicate that either a) a zero-to-one
  transition in the number of outstanding RPCs has occurred, or b) an
  unhandled exception has occurred, a) observe the transition itself,
  and b) use an optional exception field to track the presence or
  absence of an exception.

Fixes #3162.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible for Python execution to silently fail - forgetting to register resources
3 participants