Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] nil memory pointer std alerts #35

Merged
merged 1 commit into from
Jul 28, 2023
Merged

Conversation

nicolastakashi
Copy link
Collaborator

I'm fixing issues we faced with nil pointer addresses.

@nicolastakashi nicolastakashi requested a review from a team as a code owner July 28, 2023 08:52
@nicolastakashi nicolastakashi merged commit 24218f4 into main Jul 28, 2023
4 of 5 checks passed
@nicolastakashi nicolastakashi deleted the fix/nil-memory-pointer branch July 28, 2023 09:08
@@ -367,6 +367,9 @@ func flattenStandardCondition(condition *alerts.AlertCondition) coralogixv1alpha
var standardCondition coralogixv1alpha1.StandardConditions
var conditionParams *alerts.ConditionParameters

standardCondition.Threshold = new(int)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is relevant for Less, More, and MoreThanUsual (for Immediate it can cause a bug if it won't be nil).

@@ -367,6 +367,9 @@ func flattenStandardCondition(condition *alerts.AlertCondition) coralogixv1alpha
var standardCondition coralogixv1alpha1.StandardConditions
var conditionParams *alerts.ConditionParameters

standardCondition.Threshold = new(int)
standardCondition.TimeWindow = new(coralogixv1alpha1.TimeWindow)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is relevant for Less, More, and (for Immediate and MoreThanUsual it can cause a bug if it won't be nil).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants