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

core: fix crash on provider warning #2878

Merged
merged 1 commit into from
Jul 29, 2015
Merged

Conversation

phinze
Copy link
Contributor

@phinze phinze commented Jul 28, 2015

When a provider validation only returns a warning, we were cutting the
evaltree short by returning an error. This is fine during a
walkValidate but was causing trouble during walkPlan and
walkApply.

fixes #2870

When a provider validation only returns a warning, we were cutting the
evaltree short by returning an error. This is fine during a
`walkValidate` but was causing trouble during `walkPlan` and
`walkApply`.

fixes #2870
@mitchellh
Copy link
Contributor

LGTM. I don't see any problems with this especially if all the other tests pass.

Food for thought (not too much thought): there is a lot of weirdness around validation and computed attributes, and I think I commentd about it in various places and put tests in, but we do stuff like: if the config contains something computed, don't call validate during validate. I'm not sure if this affects that, but worth thinking about.

phinze added a commit that referenced this pull request Jul 29, 2015
@phinze phinze merged commit 686598e into master Jul 29, 2015
@phinze phinze deleted the b-provider-warnings-crash branch July 29, 2015 19:46
@phinze
Copy link
Contributor Author

phinze commented Jul 29, 2015

More food for thought - pretty sure this prevents multiple warnings from properly aggregating (since we're still using the error-passing mechanism to get the warnings out). Will need to revisit.

@ghost
Copy link

ghost commented May 1, 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 May 1, 2020
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.

Returning a warning in ValidateFunc will cause a panic in apply step
2 participants