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

update isEmptyValue function #5825

Conversation

modular-magician
Copy link
Collaborator

Added IsValid check, which handles nil objects , and updated our zero-checking logic to use the one built into go in 1.13. This fixes an issue where we were sending null to the API for all nested objects instead of omitting them from the request if they were unset.

The logic is slightly different than in our version, and the only way to really find out if it breaks anything is by running tests- I caught one already and I'll catch any others post-submit in our CI run. Conveniently, this affects fields that aren't set, so the only way we wouldn't notice it for a given resource would be if all of its tests set an Optional block (which is rare; usually we have at least one test that only sets Required fields)

@drebes fyi

Release Note Template for Downstream PRs (will be copied)

all: fixed issue where nested objects were getting sent as null values to GCP on create instead of being omitted from requests

Derived from GoogleCloudPlatform/magic-modules#2907

* update isEmptyValue function

* never mind, we still use 1.12 in the magician and teamcity

* revert bigtable change and fix flatten_object in update

Signed-off-by: Modular Magician <[email protected]>
@ghost ghost added the size/xs label Mar 4, 2020
@modular-magician modular-magician merged commit f366edd into hashicorp:master Mar 4, 2020
@ghost
Copy link

ghost commented Apr 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
@modular-magician modular-magician deleted the downstream-pr-dd9fd0d75441273dd101eed6fe6cb03c5b5bf4dc branch November 17, 2024 01:00
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.

1 participant