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

tfsdk: Return null value when missing from Config, Plan, and State GetAttribute() method #185

Merged
merged 5 commits into from
Sep 29, 2021

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Sep 29, 2021

Closes #150

Includes more exhaustive unit testing Config, Plan, and State GetAttribute() method, which is copied between all of them. Also left TODOs for #186 to follow this up with unknown parent checking.

@bflad bflad added bug Something isn't working reflection Issues and PRs about the reflection subsystem used to convert between attr.Values and Go values. labels Sep 29, 2021
@bflad bflad changed the title tfsdk: Allow fetching nil values from GetAttribute() tfsdk: Allow fetching null values from Config, Plan, and State GetAttribute() method Sep 29, 2021
@kmoe
Copy link
Member

kmoe commented Sep 29, 2021

👍 agree with extending this approach to Plan and State

@bflad bflad marked this pull request as ready for review September 29, 2021 16:26
@bflad bflad requested a review from a team September 29, 2021 16:26
@bflad bflad changed the title tfsdk: Allow fetching null values from Config, Plan, and State GetAttribute() method tfsdk: Return null value when missing from Config, Plan, and State GetAttribute() method Sep 29, 2021
Copy link
Member

@kmoe kmoe left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link

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 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working reflection Issues and PRs about the reflection subsystem used to convert between attr.Values and Go values.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"step cannot be applied to this value" failure after before update if nested attribute was previously null
2 participants