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 "provider ... couldn't be found" bug #2755

Merged
merged 2 commits into from
Jul 17, 2015

Conversation

phinze
Copy link
Contributor

@phinze phinze commented Jul 16, 2015

The CloseProviderTransformer relies on the ProvidedBy() interface to
look up the proper dependency for the the graph nodes it adds. This
interface needs to yield the name of a provider, AND for flattened
nodes it needs to yield the full path to a provider.

Destroy nodes did not implement this second part, which resulted in
"provider X couldn't be found" when both of these were true:

  • A module included a resource that dependend on a provider
  • The root did NOT include a provider config

Implementing a proper ProvidedBy() on the flattened version of
destroy nodes solves the issue.

fixes #2581

The `CloseProviderTransformer` relies on the `ProvidedBy()` interface to
look up the proper dependency for the the graph nodes it adds. This
interface needs to yield the name of a provider, _AND_ for flattened
nodes it needs to yield the full path to a provider.

Destroy nodes did not implement this second part, which resulted in
"provider X couldn't be found" when both of these were true:

 * A module included a resource that dependend on a provider
 * The root did _NOT_ include a provider config

Implementing a proper ProvidedBy() on the flattened version of
destroy nodes solves the issue.

fixes #2581
@phinze
Copy link
Contributor Author

phinze commented Jul 16, 2015

Kicking to @mitchellh to cook up a covering test for me. 💟

@mitchellh
Copy link
Contributor

Got the test case in, coming in.

t.Fatalf("err: %s", err)
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

mitchellh added a commit that referenced this pull request Jul 17, 2015
…estroy-node

core: fix "provider ... couldn't be found" bug
@mitchellh mitchellh merged commit b9f5d85 into master Jul 17, 2015
@mitchellh mitchellh deleted the b-provider-couldnt-be-found-destroy-node branch July 17, 2015 17:59
@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.

"provider template couldn't be found"
2 participants