-
Notifications
You must be signed in to change notification settings - Fork 98
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
Cluster version condition #524
Cluster version condition #524
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Sergey1011010 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/label docs-approved |
/label px-approved |
/retest |
85067aa
to
8cc560a
Compare
/retest |
@Sergey1011010 Please update the PR template. This is not an enhancement. |
return err | ||
} | ||
|
||
return g.updateVersionCache(ctx, configClient) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this logic here basically means that if the updateAlertsCache
fails (we couldn't connect to the metrics for some reason) then the updateVersionCache
is not executed. Is that right? Does it mean that the conditions for cluster version will not be evaluated when we can't connect to the metrics?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this logic here basically means that if the updateAlertsCache fails (we couldn't connect to the metrics for some reason) then the updateVersionCache is not executed. Is that right?
Yes, but there's no point to update version cache if we don't have valid alerts cache since current rules contain alerts anyway.
Does it mean that the conditions for cluster version will not be evaluated when we can't connect to the metrics?
Yup, conditional gatherer won't do it's job if it can't initialize any of the caches. We'd get the error in the metadata tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but there's no point to update version cache if we don't have valid alerts cache since current rules contain alerts anyway.
I am not sure I follow. We don't have any conditional rules with version yet. I think it's difficult to predict if they will have any alerts as well. If they will then it probably makes sense, but if they will not then it seems as unnecessary limitation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated changing the logic little bit so we would get more info in the archive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
/retest |
/label qe-approved |
07dc7c2
to
8297b39
Compare
type GatheringRuleMetadata struct { | ||
Rule GatheringRule `json:"rule"` | ||
Errors []error `json:"errors"` | ||
WasTriggered bool `json:"was_triggered"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. I like this idea!
@Sergey1011010 Please fix the linting and then I will approve. Good job! Thanks! |
@tremes done |
I reviewed few times and it looks good to me. I like the information in the metadata! Thanks! |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
Categories
Sample Archive
No changes
Documentation
No changes
Unit Tests
pkg/gatherers/conditional/conditional_gatherer_test.go
Privacy
No new data was collected
Changelog
No
Breaking Changes
Yes
References
https://issues.redhat.com/browse/CCXDEV-5773
https://bugzilla.redhat.com/show_bug.cgi?id=???
https://access.redhat.com/solutions/???