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

fix panic when updating a sensitive field that requires replacement #35372

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

liamcervante
Copy link
Member

This PR fixes a panic that occurs during a plan when a sensitive value update forces a resource to be replaced. We refactored the logic for gathering the required replace paths into a separate function in ddabb6a. This refactor missed that previously it was the unmarkedPriorVal that was being used for comparison rather than the basic priorVal. When the values are then compared for equality, one of the values was marked which meant the overall returned boolean value was also marked, and then the panic occurs at line 2857.

This PR simply passes in the unmarked values for both the planned and prior values, instead of recomputing the unmarked values internally. This should be acceptable as nothing about the values are actually exposed via the function, it is only the paths and there is nothing sensitive about the paths.

Target Release

1.9.0 (hopefully)

Draft CHANGELOG entry

N/A, this bug was introduced in between releases so as long as we fix before 1.9.0 we don't need a changelog entry.

@liamcervante liamcervante requested a review from a team June 21, 2024 14:37
@liamcervante liamcervante added the 1.9-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Jun 21, 2024
Copy link
Member

@nfagerlund nfagerlund left a comment

Choose a reason for hiding this comment

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

Thanks for the detailed description! This makes sense to me too.

@nfagerlund nfagerlund merged commit 21a695e into main Jun 21, 2024
6 checks passed
Copy link

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

@nfagerlund nfagerlund deleted the liamcervante/requires-sensitive-replace-panic branch June 21, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.9-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.

None yet

3 participants