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: Input walk shouldn't clobber dynamic provider config #13264

Merged
merged 1 commit into from
Apr 4, 2017

Conversation

apparentlymart
Copy link
Contributor

@apparentlymart apparentlymart commented Apr 1, 2017

During the input walk we stash the values resulting from user input (if any) in the eval context for use when later walks need to resolve the provider config.

However, this repository of input results is only able to represent literal values, since it does not retain the record of which of the keys have values that are "computed".

Previously we were blindly stashing all of the results, failing to consider that some of them might be computed. That resulted in the UnknownValue placeholder being misinterpreted as a literal value when the data is used later, which ultimately resulted in it clobbering the actual expression evaluation result and thus causing the provider to fail to configure itself.

Now we are careful to only retain in this repository the keys whose values are known statically during the input phase. This eventually gets merged with the dynamic evaluation results on subsequent walks, with the dynamic keys left untouched due to their absence from the stored input map.

This fixes #11264.


This is a pretty insidious one since the bug is during the input walk but its effects are not felt until we try to configure the provider in either the refresh or plan walk.

During the input walk we stash the values resulting from user input
(if any) in the eval context for use when later walks need to resolve
the provider config.

However, this repository of input results is only able to represent
literal values, since it does not retain the record of which of the keys
have values that are "computed".

Previously we were blindly stashing all of the results, failing to
consider that some of them might be computed. That resulted in the
UnknownValue placeholder being misinterpreted as a literal value when
the data is used later, which ultimately resulted in it clobbering the
actual expression evaluation result and thus causing the provider to
fail to configure itself.

Now we are careful to only retain in this repository the keys whose values
are known statically during the input phase. This eventually gets merged
with the dynamic evaluation results on subsequent walks, with the dynamic
keys left untouched due to their absence from the stored input map.

This fixes #11264.
@apparentlymart apparentlymart force-pushed the b-gh11264-computed-provider-args branch from 84e16d7 to 9ec509f Compare April 3, 2017 19:24
@apparentlymart apparentlymart changed the title [WIP] core: Input walk shouldn't clobber dynamic provider config core: Input walk shouldn't clobber dynamic provider config Apr 3, 2017
@apparentlymart apparentlymart requested a review from jbardin April 3, 2017 21:11
@apparentlymart apparentlymart merged commit dd8af65 into master Apr 4, 2017
@grubernaut grubernaut deleted the b-gh11264-computed-provider-args branch May 11, 2017 00:32
@ghost
Copy link

ghost commented Apr 12, 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 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

datasources are not always evaluated before providers depending on it
3 participants