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

Implement Resource Private State Management #433

Merged
merged 28 commits into from
Aug 11, 2022
Merged

Conversation

bendbennett
Copy link
Contributor

Closes: #399

@bendbennett bendbennett added the enhancement New feature or request label Aug 1, 2022
@bendbennett bendbennett force-pushed the bendbennett/issues-399 branch from 89d2743 to 69de1d4 Compare August 1, 2022 15:16
@bflad bflad self-assigned this Aug 1, 2022
@bflad bflad added this to the v0.11.0 milestone Aug 1, 2022
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Great start! I'm not sure if you're interested in trying the next steps using this new package or potentially waiting until #432 is a little more sorted since it'll be moving the types where this data will wind up. Whatever works for me (if you'd rather do the bulk of the other work with an understanding you may need to rebase for the tfsdk package changes). 😄

internal/privatestate/data.go Outdated Show resolved Hide resolved
internal/privatestate/data.go Outdated Show resolved Hide resolved
internal/privatestate/data.go Outdated Show resolved Hide resolved
internal/privatestate/data.go Outdated Show resolved Hide resolved
internal/privatestate/data_test.go Show resolved Hide resolved
internal/privatestate/data.go Show resolved Hide resolved
internal/privatestate/data.go Outdated Show resolved Hide resolved
internal/privatestate/data_test.go Show resolved Hide resolved
internal/privatestate/data.go Outdated Show resolved Hide resolved
internal/privatestate/data.go Outdated Show resolved Hide resolved
internal/privatestate/data.go Outdated Show resolved Hide resolved
@bendbennett bendbennett force-pushed the bendbennett/issues-399 branch from 2496930 to 48d25c6 Compare August 2, 2022 13:43
internal/proto5server/server_readresource_test.go Outdated Show resolved Hide resolved
internal/proto6server/server_readresource_test.go Outdated Show resolved Hide resolved
internal/fwserver/server_readresource.go Show resolved Hide resolved
resource/read.go Outdated Show resolved Hide resolved
@bendbennett bendbennett force-pushed the bendbennett/issues-399 branch 2 times, most recently from 887bb1b to b9ee558 Compare August 8, 2022 15:49
bendbennett and others added 17 commits August 9, 2022 21:48
Co-authored-by: Brian Flad <bflad417@gmail.com>
Co-authored-by: Brian Flad <bflad417@gmail.com>
…s an unexported data field containing map[string][]byte to prevent direct manipulation of the data and inadvertent addition of values that are not invalid (i.e., invalid JSON and/or UTF-8) (#399)

Reference: #399
@bendbennett bendbennett force-pushed the bendbennett/issues-399 branch from f174899 to 91cf4cb Compare August 9, 2022 20:49
@bendbennett bendbennett marked this pull request as ready for review August 9, 2022 20:51
@bendbennett bendbennett requested a review from a team as a code owner August 9, 2022 20:51
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Overall this is looking really good, just a few minor things we can tidy up. If you throw in a changelog file, I can review that too. Thanks!

internal/fromproto5/readresource_test.go Outdated Show resolved Hide resolved
internal/fwserver/attribute_plan_modification.go Outdated Show resolved Hide resolved
internal/fwserver/server_applyresourcechange_test.go Outdated Show resolved Hide resolved
internal/fwserver/server_updateresource.go Outdated Show resolved Hide resolved
resource/modify_plan.go Outdated Show resolved Hide resolved
resource/modify_plan.go Outdated Show resolved Hide resolved
resource/update.go Outdated Show resolved Hide resolved
tfsdk/attribute_plan_modification.go Outdated Show resolved Hide resolved
bendbennett and others added 2 commits August 10, 2022 11:28
Co-authored-by: Brian Flad <bflad417@gmail.com>
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Almost there! Those new Empty/Must functions make things so much easier to read, nice!

internal/fwserver/attribute_plan_modification.go Outdated Show resolved Hide resolved
internal/fwserver/block_plan_modification.go Outdated Show resolved Hide resolved
internal/fwserver/attribute_plan_modification.go Outdated Show resolved Hide resolved
internal/fwserver/server_planresourcechange.go Outdated Show resolved Hide resolved
internal/fwserver/server_planresourcechange.go Outdated Show resolved Hide resolved
internal/privatestate/data.go Outdated Show resolved Hide resolved
resource/update.go Outdated Show resolved Hide resolved
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Looks good to me 🚀

@bendbennett bendbennett merged commit 9e664c7 into main Aug 11, 2022
@bendbennett bendbennett deleted the bendbennett/issues-399 branch August 11, 2022 15:33
iwarapter pushed a commit to iwarapter/terraform-plugin-framework that referenced this pull request Sep 4, 2022
@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 Sep 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource Private State Management
2 participants