deck gateway sync and deck gateway diff incorrectly print the result of the diff operation for plugins that declare any of their fields as type "json". This happens because the fillConfigRecord function does not handle those fields and, even when the field is set to a proper value, it updates it to null before performing the diff.
I have verified that a simple if added to this function solves the issue:
if ftype.String() == "json" {
if _, ok := config[fname]; ok {
return true
}
}
but i'm unsure if that is the best way to solve it hence no pull request
go-kong/kong/utils.go
Line 419 in 2ea7f98
deck gateway syncanddeck gateway diffincorrectly print the result of the diff operation for plugins that declare any of their fields as type "json". This happens because the fillConfigRecord function does not handle those fields and, even when the field is set to a proper value, it updates it to null before performing the diff.I have verified that a simple
ifadded to this function solves the issue:but i'm unsure if that is the best way to solve it hence no pull request