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

call ApplyTFConversions in Update function from terraform plugin sdk external client #440

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

digna-ionos
Copy link

@digna-ionos digna-ionos commented Sep 13, 2024

Not calling ApplyTFConversions in Udate function of tf plugin sdk external client was causing unmarshalling errors for singleton lists.

Description of your changes

add ApplyTFConversions call in Update function, after marshalling json state and before setting the observation.

Fixes #438

I have:

  • Read and followed Upjet's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

There are already tests in place for Update function.

…external client because it was causing unmarshalling errors.

Signed-off-by: digna-ionos <darius-andrei.igna@ionos.com>
@mergenci
Copy link
Member

@digna-ionos, Can you share details of your use case that required this change? While I agree that this change is likely to be required, the fact that we haven't hit an issue for so long makes me doubt — and the impact of this change doesn't help relieve my doubt 🙂 I would be happy if you could provide more details. If you could also provide an example manifest that fails before the change and passes after, it would even be better.

@digna-ionos
Copy link
Author

@mergenci I've prepared two tests to make it simpler to understand and play with it if you need.
9a5726e#diff-88b92dceed2024799f8225f8778bfc0c159fb2cc590311563721615aa2367ec9

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.

TF Conversions are not applied in Update function
2 participants