-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix(core): make deprecated shorthand fields take precedence when new value is null #13589
Conversation
5399874
to
54f5c74
Compare
54f5c74
to
c3321f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so basically both: { new_field = null, deprecated_field = 123 }
and { new_field = 123, deprecated_field = null }
would produce: { new_field = 123 }
, did I get it right?
Successfully created backport PR for |
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-13589-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13589-to-master-to-upstream
git checkout -b cherry-pick-13589-to-master-to-upstream
ancref=$(git merge-base 4d7934b85d23441f910aa3287c1fab4947e3055f c3321f4f580bd785d718bdf5949ae708d2081b04)
git cherry-pick -x $ancref..c3321f4f580bd785d718bdf5949ae708d2081b04 |
Summary
When both new field and shorthand fields are used but the new field contains null value and the old field contains some other specific value this change allows for that specific value to overwrite the new null value. If a user wants to set explicit null they have to send request without the old value.
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
KAG-5287