-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
[WIP]: Add failing test for missing computed map entries #9634
Conversation
return UnknownVariableValue, nil | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the critical section. Because HIL (on f-unknown
, so travis will fail) handles all this automatically for us now, we don't have to do any special handling. We just evaluate HIL like normal below...
This looks great! I thought I could get this without going into HIL, but ended up going in circles. Is it possible now that we no longer need the If you want to do the HIL PR, I can take care of cleaning up this PR and fixing the vendoring. |
Perfect, made the HIL PR here: hashicorp/hil#31 EDIT: Yes, we can actually remove |
7609869
to
5de06c6
Compare
We might just to do the work to pull the Interestingly, some helper schema tests are failing non-deterministically, with varying diffs and arguments to Schema.Set. |
Picking this up for 0.8, looking into test failures. |
f4a75ce
to
3a9e68c
Compare
The map output from the module "mod" loses the computed value from the template when we validate. If the "extra" field is removed from the map, the validation fails earlier with map "does not have any elements so cannot determine type". Apply will work, because the computed value will exist in the map.
This makes all the computed stuff "just work" since HIL uses the same computed sentinel value (string UUID) and the type differentiates it from a regular string.
The primary change here is to expect that Config contains computed values. This introduces `unknownCheckWalker` that does a really basic reflectwalk to look for computed values and use that for IsComputed. We had a weird mixture before checking whether c.Config was simply missing values to determine where to look. Now we rely on IsComputed heavily.
5c84026
to
a8fbf34
Compare
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. |
Failing test fixture for #9549
The map output from the module "mod" loses the computed value from the
template when we validate. If the "extra" field is removed from the map,
the validation fails earlier with map "does not have any elements so
cannot determine type".
Apply will work, because the computed value will exist in the map.