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

Don't persist diff to the state when an update fails #857

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

imriz
Copy link
Contributor

@imriz imriz commented Apr 27, 2022

Description

Fixes #828

If the update fails, don't persist the diff to the state.

Acceptance tests

  • Have you added an acceptance test for the functionality being added?

Release Note

Release note for CHANGELOG:

...

References

Related to hashicorp/terraform-plugin-sdk#476 and https://www.terraform.io/plugin/sdkv2/guides/v2-upgrade-guide#removal-of-helper-schema-resourcedata-setpartial

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

@hashicorp-cla
Copy link

hashicorp-cla commented Apr 27, 2022

CLA assistant check
All committers have signed the CLA.

@lnattrass
Copy link

This continues to cause failed deployments for us. Do we have an ETA on when this will get merged?

@lnattrass
Copy link

@BBBmau / @jrhouston you seem to have review permissions here, and this PR has hung around for more than a month now..

@jrhouston jrhouston changed the title * Fixes 828 - If the update fails, don't persist the diff to the state Don't persist diff to the state when an update fails Jun 14, 2022
@jrhouston jrhouston merged commit 87067c9 into hashicorp:main Jun 14, 2022
@lnattrass
Copy link

Thank you! ❤️

@GertVil
Copy link

GertVil commented Jul 14, 2022

Hey, quick question. I just had a deploy fail with the following error:

Error: could not get server version from Kubernetes: an error on the server ("unknown") has prevented the request from succeeding
  on .terraform/modules/redacted/redacted_application.tf line 44, in resource "helm_release" "application":
  44: resource "helm_release" "application" {

Afterwards, when I tried another plan, it said the terraform was up to date, while clearly, the helm update did not go through. Shouldn't this merge have fixed that? We've also had different errors with grcp calls failing that seem to still result in updated terraform state.

@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 issues.
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 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform state updated with new Chart values after apply errored
5 participants