-
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
base: main
Are you sure you want to change the base?
Conversation
3fbb538
to
e24c5ae
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
==========================================
- Coverage 29.88% 29.26% -0.63%
==========================================
Files 106 106
Lines 12631 15442 +2811
==========================================
+ Hits 3775 4519 +744
- Misses 8393 10460 +2067
Partials 463 463 ☔ View full report in Codecov by Sentry. |
0bdf850
to
804c274
Compare
@nowNick
Few diffs still come up.
|
804c274
to
b8290ad
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
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. |
🟡 WIP 🛠️ 🟡
Depends on: Kong/go-kong#473
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 there is no false negative difference.
Full changelog
Issues resolved
Fix KAG-5577
Documentation
Testing