Open digna-ionos opened 2 months ago
@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.
@mergenci I've prepared two tests to make it simpler to understand and play with it if you need. https://github.com/crossplane/upjet/commit/9a5726e09448cbb026690a7217b87764dd4e0297#diff-88b92dceed2024799f8225f8778bfc0c159fb2cc590311563721615aa2367ec9
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 https://github.com/crossplane/upjet/issues/438
I have:
make reviewable
to ensure this PR is ready for review.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.