-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 #2907
update isEmptyValue function #2907
Conversation
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesNo diff detected in Ansible. New Pull RequestsI built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed. |
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesterraform-provider-google-beta already has an open PR. New Pull RequestsI didn't open any new pull requests because of this PR. |
The (wrong) behaviour is load bearing for some resources, or at least was. I'd had a PR ~ a year ago that modified this behaviour in a different way (removing the check I think), it ended up breaking at least one update test. I think it was in Firewall. Obviously it shouldn't be load bearing, so it's probably worth running a full test gauntlet on the TPGB downstream to make sure we catch as many breakages as we can. |
Yup, I thought about doing it yesterday but it would have finished after I left anyway, so I was just going to wait for the CI run and then check the output there. Now that it's the AM though I can start one up. |
Maybe needs a release note? Am fine with doing this and fixing breakages as we see them. |
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesterraform-provider-google-beta already has an open PR. New Pull RequestsI didn't open any new pull requests because of this PR. |
Can I get another review on this since I made some changes after the test run? |
Can this be merged? I'm working on a feature that depends on this... |
511f563
to
c39858d
Compare
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 7 files changed, 10 insertions(+), 6 deletions(-)) |
* update isEmptyValue function * never mind, we still use 1.12 in the magician and teamcity * revert bigtable change and fix flatten_object in update
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)