Skip to content

Commit

Permalink
Merge pull request #892 from humio/mike/fix_update_diffs
Browse files Browse the repository at this point in the history
Fix types when comparing values between CR and GraphQL for agggregate…
  • Loading branch information
SaaldjorMike authored Dec 19, 2024
2 parents 4733d0c + 95c9207 commit e55f8a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/humioaggregatealert_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func aggregateAlertAlreadyAsExpected(fromKubernetesCustomResource *humiov1alpha1
if diff := cmp.Diff(fromGraphQL.GetThrottleField(), fromKubernetesCustomResource.Spec.ThrottleField); diff != "" {
keyValues["throttleField"] = diff
}
if diff := cmp.Diff(fromGraphQL.GetThrottleTimeSeconds(), fromKubernetesCustomResource.Spec.ThrottleTimeSeconds); diff != "" {
if diff := cmp.Diff(fromGraphQL.GetThrottleTimeSeconds(), int64(fromKubernetesCustomResource.Spec.ThrottleTimeSeconds)); diff != "" {
keyValues["throttleTimeSeconds"] = diff
}
actionsFromGraphQL := humioapi.GetActionNames(fromGraphQL.GetActions())
Expand Down
2 changes: 1 addition & 1 deletion controllers/humioparser_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (r *HumioParserReconciler) logErrorAndReturn(err error, msg string) error {
func parserAlreadyAsExpected(fromKubernetesCustomResource *humiov1alpha1.HumioParser, fromGraphQL *humiographql.ParserDetails) (bool, map[string]string) {
keyValues := map[string]string{}

if diff := cmp.Diff(fromGraphQL.GetScript(), &fromKubernetesCustomResource.Spec.ParserScript); diff != "" {
if diff := cmp.Diff(fromGraphQL.GetScript(), fromKubernetesCustomResource.Spec.ParserScript); diff != "" {
keyValues["parserScript"] = diff
}
tagFieldsFromGraphQL := fromGraphQL.GetFieldsToTag()
Expand Down

0 comments on commit e55f8a0

Please sign in to comment.