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 GCS backend crash from encryption changes #1618

Merged
merged 2 commits into from
May 7, 2024

Conversation

cam72cam
Copy link
Contributor

@cam72cam cam72cam commented May 7, 2024

The GCS backend is more eager than other backends we tested during the state encryption work. Some of the more peripheral commands were assumed to not need state encryption (incorrectly) and were passed nil.

That nil was an explicit choice to pass an invalid value if accessed in case our assumptions around that code were wrong. We decided early on that we would rather panic than incorrectly disable encryption.

The fix here is fairly straightforward, I've added the same encryption logic used by other commands into the commands I thought did not require explicit encryption configuration.

Resolves #1617

Target Release

1.7.1, 1.8.0

The GCS backend is more eager than other backends we tested during the
state encryption work. Some of the more peripheral commands were
assumed to not need state encryption (incorrectly) and were passed nil.

That nil was an explicit choice to pass an invalid value if accessed in
case our assumptions around that code were wrong.  We decided early on
that we would rather panic than incorrectly disable encryption.

The fix here is fairly straightforward, I've added the same encryption
logic used by other commands into the commands I thought did not
require explicit encryption configuration.

Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
@cam72cam cam72cam requested a review from a team as a code owner May 7, 2024 11:44
Copy link

github-actions bot commented May 7, 2024

Reminder for the PR assignee: If this is a user-visible change, please update the changelog as part of the PR.

Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
@cam72cam cam72cam merged commit 91561ca into main May 7, 2024
12 checks passed
@cam72cam cam72cam deleted the fix_gcs_backend_crash_encryption branch May 7, 2024 13:00
cam72cam added a commit that referenced this pull request May 7, 2024
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
bunniseng pushed a commit to bunniseng/opentofu that referenced this pull request May 28, 2024
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when forcing unlock
2 participants