From 641281d3e4bf9c60fddc78ba7d675fec4471bcac Mon Sep 17 00:00:00 2001 From: ravitejasurampudi Date: Fri, 7 Jul 2023 12:59:42 +0530 Subject: [PATCH 1/2] fix(data_partition): fix issue with enable attribute --- pkg/logconfigurations/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/logconfigurations/types.go b/pkg/logconfigurations/types.go index 59fbd2c5..3431a44b 100644 --- a/pkg/logconfigurations/types.go +++ b/pkg/logconfigurations/types.go @@ -421,7 +421,7 @@ type LogConfigurationsUpdateDataPartitionRuleInput struct { // The description of the data partition rule. Description string `json:"description,omitempty"` // Whether or not this data partition rule is enabled. - Enabled bool `json:"enabled,omitempty"` + Enabled bool `json:"enabled"` // Unique data partition rule identifier. ID string `json:"id"` // The criteria of the data partition rule. From 22434d92a22f9d8d51813ee10f3d8b020fe3c1f5 Mon Sep 17 00:00:00 2001 From: pranav-new-relic Date: Tue, 11 Jul 2023 12:01:36 +0530 Subject: [PATCH 2/2] fix(data_partition): addition of a comment to not add omitempty from Tutone --- pkg/logconfigurations/types.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/logconfigurations/types.go b/pkg/logconfigurations/types.go index 3431a44b..a324e9ae 100644 --- a/pkg/logconfigurations/types.go +++ b/pkg/logconfigurations/types.go @@ -421,6 +421,8 @@ type LogConfigurationsUpdateDataPartitionRuleInput struct { // The description of the data partition rule. Description string `json:"description,omitempty"` // Whether or not this data partition rule is enabled. + // NOTE: DO NOT add 'omitempty' to the JSON description of Enabled as fetched from Tutone. + // It omits 'enabled' even if the calling service sends it as 'false', which is why 'omitempty' has been manually discarded. Enabled bool `json:"enabled"` // Unique data partition rule identifier. ID string `json:"id"`