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

terraform: GraphWalkerPanicwrap to catch panics, shadow graph uses it #9852

Merged
merged 2 commits into from
Nov 3, 2016

Conversation

mitchellh
Copy link
Contributor

@mitchellh mitchellh commented Nov 3, 2016

Related to #9840

This PR:

  • Adds the ability for GraphWalkers to declare they want to catch panics (by implementing GraphWalkerPanicwrapper)

  • Modifies the graph walk to turn panics into errors if the above interface is implemented. This makes it so that panics are never able to be completely thrown away. They either crash Terraform or turn into errors that will bubble up.

  • Modifies shadow graph execution to always capture panics.

This adds some additional robustness around shadow graph execution so that panics during graph walking do not cause Terraform to crash. If this was in place for #9840 then the panic would've shown up as a normal shadow error versus crashing. This would've been okay since the original (non-shadow) graph finished successfully.

This doesn't cover 100% of the scenarios where a shadow graph can crash, but it covers a very large section and one of two most likely areas it would crash (evaluation). The other area would be graph construction itself. This PR doesn't affect the latter positively or negatively.

@mitchellh mitchellh merged commit 230ea92 into master Nov 3, 2016
@mitchellh mitchellh deleted the b-walker-panic branch November 3, 2016 20:09
@ghost
Copy link

ghost commented Apr 20, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 20, 2020
This pull request was closed.
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.

2 participants