-
Notifications
You must be signed in to change notification settings - Fork 24
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
shorten default timeout for aggregate; allow configuration of timeout for aggregates #418
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## main #418 +/- ##
==========================================
+ Coverage 64.37% 64.72% +0.35%
==========================================
Files 94 94
Lines 6563 6654 +91
==========================================
+ Hits 4225 4307 +82
- Misses 2097 2103 +6
- Partials 241 244 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Good PR!
Sorry for taking so long to review it
pkg/api/extract_aggregate.go
Outdated
@@ -17,12 +17,19 @@ | |||
|
|||
package api | |||
|
|||
type Aggregates struct { | |||
DefaultExpiryTime Duration `yaml:"defaultExpiryTime,omitempty" json:"defaultExpiryTime,omitempty" doc:"default time duration of data aggregation to perform rules"` |
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 think we should mention that if DefaultExpiryTime
is not set, its value will be 2 minutes:
https://github.com/netobserv/flowlogs-pipeline/pull/418/files#diff-3206b2a171d46917f659fcfac94df70757ba6b7106bbbaf81c6a47fa93c2320aR30-R31
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.
Added
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 meant to add it to the docstring of Aggregates.DefaultExpiryTime
(rather than AggregateDefinition.ExpiryTime
)
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.
Done
aggregates := Aggregates{ | ||
expiryTime: defaultExpiryTime, | ||
cleanupLoopTime: cleanupLoopTime, |
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.
Do we want to make cleanupLoopTime
configurable as well or are we OK with keeping it 2 minutes?
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 think its OK.
New image: quay.io/netobserv/flowlogs-pipeline:073a2ed. It will expire after two weeks. |
Change default timeout for aggregates from 10 minutes to 2 minutes.
Allow different time intervals for individual aggregates.