Skip to content

Fix panic on invalid depends_on root.#21589

Merged
mildwonkey merged 1 commit intohashicorp:masterfrom
k0ffee:fix/crash-on-invalid-depends_on
Jun 6, 2019
Merged

Fix panic on invalid depends_on root.#21589
mildwonkey merged 1 commit intohashicorp:masterfrom
k0ffee:fix/crash-on-invalid-depends_on

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 4, 2019

Assume "ref" can be nil and report an invalid reference to
the user instead of crashing.

This is a regression from terraform 0.11 and now fails in 0.12.0.

Including test case.

@hashicorp-cla
Copy link
Copy Markdown

hashicorp-cla commented Jun 4, 2019

CLA assistant check
All committers have signed the CLA.

@mildwonkey mildwonkey requested a review from a team June 5, 2019 18:52
Copy link
Copy Markdown
Contributor

@pselle pselle left a comment

Choose a reason for hiding this comment

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

Looking good! One question/nit

Comment thread terraform/eval_validate.go Outdated
@mildwonkey
Copy link
Copy Markdown
Contributor

Thanks for working on this @tinocode !

I'm going to dig a little deeper into this issue - from my understanding, there should always be an error if ref is nil, and I'd like to figure out why this situation isn't generating an error. We might end up fixing two problems :)

@mildwonkey mildwonkey self-assigned this Jun 5, 2019
Comment thread terraform/eval_validate_test.go Outdated
Comment thread terraform/eval_validate.go Outdated
Assume "ref" can be nil and report an invalid reference to
the user instead of crashing.
@mildwonkey
Copy link
Copy Markdown
Contributor

Great, thank you so much @tinocode! 🎉

@mildwonkey mildwonkey merged commit 51a4055 into hashicorp:master Jun 6, 2019
@ghost
Copy link
Copy Markdown

ghost commented Jul 25, 2019

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 Jul 25, 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