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

command/jsonstate: remove redundant remarking of resource instance #29049

Merged
merged 2 commits into from
Jun 29, 2021

Conversation

mildwonkey
Copy link
Contributor

@mildwonkey mildwonkey commented Jun 28, 2021

ResourceInstanceObjectSrc.Decode already handles marking the decoded values with any marks stored in AttrSensitivePaths, so re-applying those marks is not necessary and seems to be related to panics seen in the wild, as seen in #29042.

I have yet to reproduce the reported panic in a test (or locally, for that matter), so I won't close the linked issue until we can get a reproduction/confirmation. The test case I added was not enough to cause a panic, even though the value was already marked.

Update: @davidalger wrote a test for me, yay! @apparentlymart believes that an upstream fix he recently merged would fix this panic, but the code is still redundant (and yay, more test cases!) so I'd still like this reviewed.

ResourceInstanceObjectSrc.Decode already handles marking values with any marks stored in ri.Current.AttrSensitivePaths, so re-applying those marks is not necessary.

We've gotten reports of panics coming from this line of code, though I have yet to reproduce the panic in a test.
@mildwonkey mildwonkey 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 Jun 28, 2021
@hashicorp-cla
Copy link

hashicorp-cla commented Jun 29, 2021

CLA assistant check
All committers have signed the CLA.

@mildwonkey
Copy link
Contributor Author

@davidalger, can you sign the CLA so I can include your commit in this PR? Thanks!

@mildwonkey mildwonkey requested a review from a team June 29, 2021 12:51
@davidalger
Copy link
Contributor

@mildwonkey CLA signed.

@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 Aug 18, 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.

5 participants