-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fill config values and defaults in shorthand fields (#458)
* fix: fill config values and defaults in shorthand fields As of now, deprecated fields are renamed to shorthand_fields in all schemas, as per the conventions. Till now, we do not fill any values for these fields while attempting to fill config records for plugins. This creates a visualisation problem in decK. Everytime, a deck diff or deck sync command is issued, it shows that the deprecated field values are changed and need to be updated, thus running an unnecessary update process each time and also confusing end users. Check #1251: Kong/deck#1251 for clarity. This fix attempts to fill defaults for the shorthand_fields, retaining their values, if passed. Also, since shorthand_fields take priority over normal/nested fields in the gateway, if any changes are detected in shorthand_fields, it is backfilled to nested fields as well. * test: unit test added for shorthand_fields filling * chore: godoc for new functions added, comments added for clarification * chore: typo correction and preallocation of slice for backward path translation
- Loading branch information
1 parent
a9ec2d5
commit e54b4ed
Showing
2 changed files
with
289 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters