-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(diff): support auto fields (#136)
* fix(diff): support auto fields call the new utils function FillPluginsDefaultsAutoFields from go-kong to ensure auto fields are considered when doing the diff * fix(crud): detect operation correctly fixes a bug that was introduced in e72f4c2 where noops were still detected as updates. That happened because of a check happening in plugin.go that detected the crud operation based on a diff. When done without considering default/auto fields, this check would see differences where there were none. This resulted in unnecessary updates to the DB and wrong diff strings during `sync` and `diff`. This commit adds defaults/auto fields to the configuration used for that diff. * pr review suggestions
- Loading branch information
Showing
5 changed files
with
85 additions
and
7 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
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
5 changes: 5 additions & 0 deletions
5
tests/integration/testdata/sync/034-fill-auto-oauth2/kong.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
_format_version: "3.0" | ||
plugins: | ||
- name: oauth2 | ||
config: | ||
enable_password_grant: true |