-
Notifications
You must be signed in to change notification settings - Fork 95
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
ApiRequestCount conditional gathering #492
Conversation
Skipping CI for Draft Pull Request. |
453cb2b
to
6494031
Compare
de44227
to
7deea7d
Compare
} | ||
|
||
func (g *Gatherer) gatherAPIRequestCounts(ctx context.Context, alertName string) ([]record.Record, []error) { | ||
var resources []string |
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.
Maybe better to make it a set to improve performance of the for loop lil bit
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.
you mean the https://github.com/openshift/insights-operator/pull/492/files#diff-768929cfc4894c47306f40d5abfcac538dd69ef7d32f7b0a347dc31ce6919660R79 right? Yeah I think I can use a set. Thanks
7deea7d
to
92f05be
Compare
looks great |
/lgtm |
/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. |
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.
Tested locally according to the steps provided using the Service Mesh operator, which resulted in conditional/alerts/APIRemovedInNextEUSReleaseInUse/api_request_counts.json
file being successfully generated after an hour.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: natiiix, rluders, tremes 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 |
* ApiRequestCounts conditional gathering * Test and minor updates according to the review * Update name * Fix also the schema * Change Alert type to AlertLabels map
This is adding a new conditional gatherer. If the
APIRemovedInNextEUSReleaseInUse
alert is firing then it looks at its labels, get the resource, version and group from them and finds the correspondingAPIRequestCounts
"record" for this resource.Categories
Sample Archive
docs/insights-archive-sample/conditional/api_request_counts.json
Documentation
docs/gathered-data.md
Unit Tests
pkg/gatherers/conditional/gather_api_request_count_test.go
Privacy
Yes. There are no sensitive data in the newly collected information.
Changelog
Breaking Changes
No
References
https://issues.redhat.com/browse/CCXDEV-5581
https://bugzilla.redhat.com/show_bug.cgi?id=???
https://access.redhat.com/solutions/???