terraform-provider-helm icon indicating copy to clipboard operation
terraform-provider-helm copied to clipboard

Larger diff than expected when updating helm_release 'set' 'value'

Open adcharre opened this issue 3 years ago • 9 comments

Description

Fix issue #915 where when re-deploying a helm_release after changing a 'set' 'value' the plan generated indicates that values not changing will be deleted and re-applied even though they have not been changed.

The issue is caused by the resource diff process removing the 'set' 'type' value from the state as it was not set in the original terraform code. When initially applying the plan the default value "" was used for the 'set' 'type' and stored in the state, when redeploying the original value of 'set' 'type' is requested but as no default has been set in the schema it is marked as removed, which then results in null being stored in the state for the value of 'set' 'type'. This causes an internal warning to be generated in the logs: "Provider "registry.terraform.io/hashicorp/helm" produced an unexpected new value for helm_release.test during refresh."

Acceptance tests

  • [Y] Have you added an acceptance test for the functionality being added?
    • TestAccResourceRelease_updateSetValue - confirms that 'type' is not lost when updating value.

Release Note

Release note for CHANGELOG:

Fix large diffs being generated when updating a 'set' 'value'

References

  • #915
  • Possible fix for #711

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

adcharre avatar Jul 11 '22 11:07 adcharre

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Jul 11 '22 11:07 hashicorp-cla

@jrhouston - as this is a first PR for terraform helm provider, is there anything more you might need/I've missed in this PR?

adcharre avatar Jul 12 '22 14:07 adcharre

Hey @adcharre! did this fix #711 for you as well?

fcrespofastly avatar Aug 18 '22 09:08 fcrespofastly

Hey @adcharre! did this fix #711 for you as well?

I've certainly not seen any issues since using this fix and the unit tests also suggests that it fixes problems with set blocks. Any help with a thumbs up on this PR to get it merged would be appreciated!

adcharre avatar Aug 18 '22 10:08 adcharre

I've certainly not seen any issues since using this fix and the unit tests also suggests that it fixes problems with set blocks. Any help with a thumbs up on this PR to get it merged would be appreciated!

Thanks! do you have kind of your own private registry where you uploaded your custom build of the provider?

fcrespofastly avatar Aug 18 '22 10:08 fcrespofastly

Who should we be requesting a review from to get this merged? seems like a very straightorward PR ...

fcrespofastly avatar Aug 18 '22 15:08 fcrespofastly

Who should we be requesting a review from to get this merged? seems like a very straightorward PR ...

@fcrespofastly looking at the contributors and some previous PRs it looks like a key contributor is @jrhouston

xThomo avatar Aug 24 '22 12:08 xThomo

Hey @jrhouston! 👋🏻 👋🏻 this seems like a pretty reasonable and straightforward PR, any chance we can get this merged? We currently can't render manifests which impacts our ability to validate the plan prior to apply.

fcrespofastly avatar Aug 29 '22 08:08 fcrespofastly

Hey @jrhouston any chance you can take a look at this one?

fcrespofastly avatar Sep 15 '22 17:09 fcrespofastly

Dear @jrhouston, @BBBmau

I noticed you recently helped merge and release few fixes, can you please spare a minute to get this fix in? this is a straightforward change and addresses both #915 & #711 🙏🏼

dkulchinsky avatar Oct 12 '22 20:10 dkulchinsky

Hey @jrhouston 👋🏻 👋🏻 !

I noticed you reacted to @dkulchinsky's comment. Did you have a chance to review this PR? 🙏🏻

Thanks in advance!!

fcrespofastly avatar Oct 17 '22 07:10 fcrespofastly

@jrhouston many thanks for reviewing and getting this merged 🙏🏼

could you also help to get this fix released in a new patch version?

dkulchinsky avatar Oct 18 '22 14:10 dkulchinsky

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[bot] avatar Nov 18 '22 02:11 github-actions[bot]