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

Regress AWS-3835 #1881

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Regress AWS-3835 #1881

wants to merge 1 commit into from

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Apr 17, 2024

No description provided.

"inputs": {
"__defaults": [],
"auths": [
{}
Copy link
Member Author

Choose a reason for hiding this comment

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

We're not expecting this here at all... somehow Check decided that the unknown value "04da6b54-80e4-46f7-96ec-b56ff0331ba9" should now be [{}]

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be passing in unknown for the whole thing? Why do we not pass in a set of unknown instead of an unknown set?

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.08%. Comparing base (0e639f6) to head (334f33d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1881      +/-   ##
==========================================
+ Coverage   60.06%   60.08%   +0.02%     
==========================================
  Files         327      327              
  Lines       43919    43919              
==========================================
+ Hits        26378    26390      +12     
+ Misses      16050    16038      -12     
  Partials     1491     1491              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@t0yv0
Copy link
Member Author

t0yv0 commented Apr 17, 2024

// makeTerraformUnknown creates an unknown value with the shape indicated by the given schema.
//
// It is important that we use the TF schema (if available) to decide what shape the unknown value should have:
// e.g. TF does not play nicely with unknown lists, instead expecting a list of unknowns.
func makeTerraformUnknown(tfs shim.Schema) interface{} {

I suspect this is coming from some working around TF blocks (single-, list- and set-nested) that in TF don't naturally receive unknowns, but do in Pulumi, so it's substituting empty plausible values instead of unknown values. It would be interesting to see if modern TF can actually handle unknowns here or if this substitution is necessary, for MakeTerraformInptus to do the right thing in these situations.

This feels entirely undesirable though for Check. Here trying to turn around through TF loses unknown-ness information. That is not what we want. It would make more sense for Check not to swallow unknowns.

@t0yv0
Copy link
Member Author

t0yv0 commented Apr 17, 2024

CC @VenelinMartinov @iwahbe

@t0yv0
Copy link
Member Author

t0yv0 commented Apr 17, 2024

As a side-effect of this the diffs don't look right at all. I wonder if we could fix that while not introducing any more issues to the underlying machinery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants