Skip to content

Computed values within nested object types in AssertPlanValid#29482

Merged
jbardin merged 4 commits intomainfrom
jbardin/computed-obj-attrs
Aug 31, 2021
Merged

Computed values within nested object types in AssertPlanValid#29482
jbardin merged 4 commits intomainfrom
jbardin/computed-obj-attrs

Conversation

@jbardin
Copy link
Copy Markdown
Member

@jbardin jbardin commented Aug 30, 2021

Some fixes for nested object attribute handling in AssertPlanValid.

  • The validation for nested object types with computed attributes was using the incorrect function call for individual attributes.
  • When using NestedMap objects, unify the codepath for both maps and objects as they may be interchangeable.
  • While blocks were not allowed to be computed by the provider, nested objects can be. Remove the errors regarding blocks and test unknown values are valid.

Fixes #29473

The validation for nested object types with computed attributes was
using the incorrect function call.
When using NestedMap objects, unify the codepath for both maps and
objects as they may be interchangeable.
While blocks were not allowed to be computed by the provider, nested
objects can be. Remove the errors regarding blocks and verify unknown
values are valid.
@jbardin jbardin added the 1.0-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Aug 30, 2021
@jbardin jbardin requested a review from a team August 30, 2021 18:33
}
}

func TestAssertPlanValidTEST(t *testing.T) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What does the "TEST" at the end of this function name represent? 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oops, that was my temporary test harness for trying out values. I'll delete that before merging!

@jbardin jbardin merged commit 7c02ef6 into main Aug 31, 2021
@jbardin jbardin deleted the jbardin/computed-obj-attrs branch August 31, 2021 15:26
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 1, 2021

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

1.0-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"panic: value is not an object" when MapNestedAttributes contains more than one computed attribute

2 participants