From 201fba6b96edde02a485ce05a784976ca11327c9 Mon Sep 17 00:00:00 2001 From: NSSPKrishna Date: Wed, 14 Sep 2022 19:54:01 +0530 Subject: [PATCH 1/5] chore(workloads): type overrides --- .tutone.yml | 11 +++++++++++ pkg/workloads/types.go | 4 ++-- test | 0 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 test diff --git a/.tutone.yml b/.tutone.yml index a32589188..ae1056bd2 100644 --- a/.tutone.yml +++ b/.tutone.yml @@ -1013,6 +1013,17 @@ packages: field_type_override: "*WorkloadScopeAccountsInput" - name: WorkloadUpdateStatusConfigInput field_type_override: "*WorkloadUpdateStatusConfigInput" + #status config overrides + # - name: WorkloadRemainingEntitiesRuleInput + # - name: WorkloadRollupInput + # - name: WorkloadRemainingEntitiesRuleRollupInput + # - name: WorkloadRuleThresholdType + # - name: WorkloadRollupRuleDetails + # - name: WorkloadAutomaticStatus + - name: WorkloadAutomaticStatusInput + field_type_override: "*WorkloadAutomaticStatusInput" + - name: WorkloadUpdateAutomaticStatusInput + field_type_override: "*WorkloadUpdateAutomaticStatusInput" # # Types owned by other packages diff --git a/pkg/workloads/types.go b/pkg/workloads/types.go index b0adacfbc..047dda317 100644 --- a/pkg/workloads/types.go +++ b/pkg/workloads/types.go @@ -411,7 +411,7 @@ type WorkloadStatusConfig struct { // WorkloadStatusConfigInput - The input object used to provide the configuration that defines how the status of the workload is calculated. type WorkloadStatusConfigInput struct { // An input object used to represent an automatic status configuration. - Automatic WorkloadAutomaticStatusInput `json:"automatic,omitempty"` + Automatic *WorkloadAutomaticStatusInput `json:"automatic,omitempty"` // A list of static status configurations. You can only configure one static status for a workload. Static []WorkloadStaticStatusInput `json:"static,omitempty"` } @@ -489,7 +489,7 @@ type WorkloadUpdateStaticStatusInput struct { // WorkloadUpdateStatusConfigInput - The input object used to provide the configuration that defines how the status of the workload is calculated. type WorkloadUpdateStatusConfigInput struct { // An input object used to represent an automatic status configuration. - Automatic WorkloadUpdateAutomaticStatusInput `json:"automatic,omitempty"` + Automatic *WorkloadUpdateAutomaticStatusInput `json:"automatic,omitempty"` // A list of static status configurations. You can only configure one static status for a workload. Static []WorkloadUpdateStaticStatusInput `json:"static,omitempty"` } diff --git a/test b/test new file mode 100644 index 000000000..e69de29bb From 69e890e99ea839daeb6c5a2792373762df1f9d1c Mon Sep 17 00:00:00 2001 From: NSSPKrishna Date: Thu, 22 Sep 2022 18:52:33 +0530 Subject: [PATCH 2/5] chore(workloads): fixed type overrides --- .tutone.yml | 13 +++++++------ pkg/workloads/types.go | 10 +++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.tutone.yml b/.tutone.yml index ae1056bd2..643d47099 100644 --- a/.tutone.yml +++ b/.tutone.yml @@ -1014,16 +1014,17 @@ packages: - name: WorkloadUpdateStatusConfigInput field_type_override: "*WorkloadUpdateStatusConfigInput" #status config overrides - # - name: WorkloadRemainingEntitiesRuleInput - # - name: WorkloadRollupInput - # - name: WorkloadRemainingEntitiesRuleRollupInput - # - name: WorkloadRuleThresholdType - # - name: WorkloadRollupRuleDetails - # - name: WorkloadAutomaticStatus - name: WorkloadAutomaticStatusInput field_type_override: "*WorkloadAutomaticStatusInput" - name: WorkloadUpdateAutomaticStatusInput field_type_override: "*WorkloadUpdateAutomaticStatusInput" + - name: WorkloadRemainingEntitiesRuleInput + field_type_override: "*WorkloadRemainingEntitiesRuleInput" + - name: WorkloadRemainingEntitiesRuleRollupInput + field_type_override: "*WorkloadRemainingEntitiesRuleRollupInput" + - name: WorkloadRollupInput + field_type_override: "*WorkloadRollupInput" + - name: WorkloadRuleThresholdType # # Types owned by other packages diff --git a/pkg/workloads/types.go b/pkg/workloads/types.go index 047dda317..d0f978ed5 100644 --- a/pkg/workloads/types.go +++ b/pkg/workloads/types.go @@ -151,7 +151,7 @@ type WorkloadAutomaticStatusInput struct { // Whether the automatic status configuration is enabled or not. Enabled bool `json:"enabled"` // An additional meta-rule that can consider all entities that haven't been evaluated by any other rule. - RemainingEntitiesRule WorkloadRemainingEntitiesRuleInput `json:"remainingEntitiesRule,omitempty"` + RemainingEntitiesRule *WorkloadRemainingEntitiesRuleInput `json:"remainingEntitiesRule,omitempty"` // A list of rules. Rules []WorkloadRegularRuleInput `json:"rules,omitempty"` } @@ -259,7 +259,7 @@ type WorkloadRegularRuleInput struct { // A list of entity search queries used to retrieve the entities that compose the rule. EntitySearchQueries []WorkloadEntitySearchQueryInput `json:"entitySearchQueries,omitempty"` // The input object used to represent a rollup strategy. - Rollup WorkloadRollupInput `json:"rollup,omitempty"` + Rollup *WorkloadRollupInput `json:"rollup,omitempty"` } // WorkloadRemainingEntitiesRule - The definition of a remaining entities rule. @@ -271,7 +271,7 @@ type WorkloadRemainingEntitiesRule struct { // WorkloadRemainingEntitiesRuleInput - The input object used to represent a remaining entities rule. type WorkloadRemainingEntitiesRuleInput struct { // The input object used to represent a rollup strategy. - Rollup WorkloadRemainingEntitiesRuleRollupInput `json:"rollup,omitempty"` + Rollup *WorkloadRemainingEntitiesRuleRollupInput `json:"rollup,omitempty"` } // WorkloadRemainingEntitiesRuleRollup - The rollup strategy. @@ -431,7 +431,7 @@ type WorkloadUpdateAutomaticStatusInput struct { // Whether the automatic status configuration is enabled or not. Enabled bool `json:"enabled"` // An additional meta-rule that can consider all entities that haven't been evaluated by any other rule. - RemainingEntitiesRule WorkloadRemainingEntitiesRuleInput `json:"remainingEntitiesRule,omitempty"` + RemainingEntitiesRule *WorkloadRemainingEntitiesRuleInput `json:"remainingEntitiesRule,omitempty"` // A list of rules. Rules []WorkloadUpdateRegularRuleInput `json:"rules,omitempty"` } @@ -469,7 +469,7 @@ type WorkloadUpdateRegularRuleInput struct { // The unique identifier of the rule to be updated. If not provided, a new rule is created. ID int `json:"id,omitempty"` // The input object used to represent a roll-up strategy. - Rollup WorkloadRollupInput `json:"rollup,omitempty"` + Rollup *WorkloadRollupInput `json:"rollup,omitempty"` } // WorkloadUpdateStaticStatusInput - The input object used to represent the configuration of a static status. From 9f232b3a6d8a1b28d5a1f747e81149fdf2a12bf9 Mon Sep 17 00:00:00 2001 From: Maria Bazhlekova Date: Mon, 26 Sep 2022 10:54:02 -0500 Subject: [PATCH 3/5] chore: remove empty test file --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test diff --git a/test b/test deleted file mode 100644 index e69de29bb..000000000 From f522cc6ca1ab2f6e65d1777d220060c18dc275d5 Mon Sep 17 00:00:00 2001 From: Maria Bazhlekova Date: Mon, 26 Sep 2022 11:03:44 -0500 Subject: [PATCH 4/5] fix: make some workloads types nullable From f0faf2493c348228b258f5735d6cbfc61fa44074 Mon Sep 17 00:00:00 2001 From: nr-developer-toolkit <62031461+nr-developer-toolkit@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:14:53 +0000 Subject: [PATCH 5/5] chore(release): release v0.91.3 --- CHANGELOG.md | 8 +++++++- internal/version/version.go | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89a830677..fe3499e27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ + +## [v0.91.3] - 2022-09-26 +### Bug Fixes +- make some workloads types nullable + ## [v0.91.2] - 2022-09-22 ### Bug Fixes @@ -1428,7 +1433,8 @@ - extract paging implementation - rename packages for clarity, promote Config to the public package -[Unreleased]: https://github.com/newrelic/newrelic-client-go/compare/v0.91.2...HEAD +[Unreleased]: https://github.com/newrelic/newrelic-client-go/compare/v0.91.3...HEAD +[v0.91.3]: https://github.com/newrelic/newrelic-client-go/compare/v0.91.2...v0.91.3 [v0.91.2]: https://github.com/newrelic/newrelic-client-go/compare/v0.91.1...v0.91.2 [v0.91.1]: https://github.com/newrelic/newrelic-client-go/compare/v0.91.0...v0.91.1 [v0.91.0]: https://github.com/newrelic/newrelic-client-go/compare/v0.90.0...v0.91.0 diff --git a/internal/version/version.go b/internal/version/version.go index c9111c273..476979ef0 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -1,4 +1,4 @@ package version // Version of this library -const Version string = "0.91.2" +const Version string = "0.91.3"