Skip to content

encoding of changes should always return a value#36212

Merged
jbardin merged 1 commit intomainfrom
jbardin/changes-errors
Dec 13, 2024
Merged

encoding of changes should always return a value#36212
jbardin merged 1 commit intomainfrom
jbardin/changes-errors

Conversation

@jbardin
Copy link
Copy Markdown
Member

@jbardin jbardin commented Dec 13, 2024

Terraform always attempts to generate a plan even when encountering an error, so we need to ensure that all plan elements have valid values to store and inspect later. Ensuring that Changes.Encode always returns a valid value avoids the need for nil checks elsewhere while returning an error to the user.

Fixes #36209

Terraform always attempts to generate a plan even when encountering an
error, so we need to ensure that all plan elements have valid values to
store and inspect later. Ensuring that `Changes.Encode` always returns a
valid value avoids the need for nil checks elsewhere while returning an
error to the user.
@jbardin jbardin requested a review from a team as a code owner December 13, 2024 13:31
Copy link
Copy Markdown
Contributor

@liamcervante liamcervante left a comment

Choose a reason for hiding this comment

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

backport?

@jbardin
Copy link
Copy Markdown
Member Author

jbardin commented Dec 13, 2024

oh yes 👍 forgot to label before review

@jbardin jbardin added the 1.10-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Dec 13, 2024
@jbardin jbardin merged commit 4484658 into main Dec 13, 2024
@jbardin jbardin deleted the jbardin/changes-errors branch December 13, 2024 13:49
@github-actions
Copy link
Copy Markdown
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@github-actions
Copy link
Copy Markdown
Contributor

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 Jan 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

1.10-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: runtime error: invalid memory address or nil pointer dereference

2 participants