-
Notifications
You must be signed in to change notification settings - Fork 3
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(diff): clear unmatching deprecated fields #145
Conversation
3fbb538
to
e24c5ae
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
==========================================
- Coverage 29.88% 28.50% -1.38%
==========================================
Files 106 106
Lines 12631 15851 +3220
==========================================
+ Hits 3775 4519 +744
- Misses 8393 10869 +2476
Partials 463 463 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
0bdf850
to
804c274
Compare
@nowNick
Few diffs still come up.
|
b8290ad
to
c146dc6
Compare
Ok @Prashansa-K I think I know what's wrong. The point 2 & 3 are the case when a new field contains a default value. For example - in the config you presented there's
I think the solution here is to improve the default filling logic. Right now we base it on what's in the yaml file and what's in the schema. It fills the missing fields with It's getting more and more pear shaped. I'm happy to explore other / simpler solutions. However I'm afraid that still - what we used to do - rewrite the value from deprecated field to new field won't cut it anymore. |
34c0f01
to
dc0df4a
Compare
b3f3a09
to
76a167f
Compare
76a167f
to
93ffc4a
Compare
When user uses decK configuration and they use only new or the old (deprecated) fields then we don't want to display incorrect diff. We used to try to "fill" those fields but sometimes it's impossible to do that. The reason why we need to fill in these fields is that Kong, in order to be backwards compatible sends, both new and old fields. This commit removes either the deprecated or the new fields from the response from Kong before doing the diff so that there is no false negative difference. KAG-5577
Summary
When user uses decK configuration and they use only new or the old (deprecated) fields then we don't want to display incorrect diff. We used to try to "fill" those fields but sometimes it's impossible to do that. The reason why we need to fill in these fields is that Kong, in order to be backwards compatible sends, both new and old fields. This commit removes either the deprecated or the new fields from the response from Kong before doing the diff so that the Kong's response and the config from file are aligned.
Full changelog
Issues resolved
Fix KAG-5577
Documentation
Related PRs:
Testing