feat: skip default injection in entities before sync#391
feat: skip default injection in entities before sync#391Prashansa-K wants to merge 2 commits intorefactor/schema-managementfrom
Conversation
|
This is ready to review. Konnect testing is completed here: https://github.com/Kong/deck/actions/runs/22627365616/job/65567998858 |
ed9ab21 to
b2e87f1
Compare
c8b395f to
9fa8bcd
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## refactor/schema-management #391 +/- ##
==============================================================
- Coverage 28.67% 28.53% -0.15%
==============================================================
Files 121 121
Lines 16374 16477 +103
==============================================================
+ Hits 4695 4701 +6
- Misses 11063 11159 +96
- Partials 616 617 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Tests and changes for dual flows - default injection and without are added here: Kong/deck#1904 |
| client *kong.Client | ||
| ctx context.Context | ||
|
|
||
| schemasCache map[string]map[string]interface{} |
There was a problem hiding this comment.
out of curiosity - since this is a private member of this struct, and the struct itself is a private member of this package, I couldn't find any instance if this being used in the past within this package - please correct me if I'm wrong.
Summary
This PR allows deck to sync/diff/apply changes for entities without
injecting defaults.
Defaults are stripped from the dumped state - current state.
For target state, defaults are not injected at all. Further, defaults that
may already be present in the target content are stripped as well.
To ensure that diffing works correctly, we are allowing the differ
to use the schema and default caches to utilise them before generating
a diff.
Issues resolved
For Kong/deck#1842
Documentation
Testing