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

shorten default timeout for aggregate; allow configuration of timeout for aggregates #418

Merged
merged 8 commits into from
May 14, 2023

Conversation

KalmanMeth
Copy link
Collaborator

Change default timeout for aggregates from 10 minutes to 2 minutes.
Allow different time intervals for individual aggregates.

@openshift-ci
Copy link

openshift-ci bot commented Apr 2, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from kalmanmeth. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@KalmanMeth KalmanMeth linked an issue Apr 2, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Apr 2, 2023

Codecov Report

Merging #418 (6fb67f9) into main (d4340d6) will increase coverage by 0.35%.
The diff coverage is 100.00%.

@@            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     
Flag Coverage Δ
unittests 64.72% <100.00%> (+0.35%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/config/config.go 66.66% <ø> (ø)
pkg/confgen/confgen.go 47.82% <100.00%> (ø)
pkg/confgen/dedup.go 100.00% <100.00%> (ø)
pkg/confgen/doc.go 96.15% <100.00%> (ø)
pkg/confgen/extract.go 35.29% <100.00%> (ø)
pkg/confgen/flowlogs2metrics_config.go 68.83% <100.00%> (ø)
pkg/config/pipeline_builder.go 84.74% <100.00%> (+0.53%) ⬆️
pkg/config/stage_params.go 92.85% <100.00%> (+0.54%) ⬆️
pkg/pipeline/extract/aggregate/aggregates.go 91.37% <100.00%> (+1.18%) ⬆️
pkg/pipeline/extract/extract_aggregate.go 56.25% <100.00%> (-8.75%) ⬇️

... and 12 files with indirect coverage changes

@KalmanMeth KalmanMeth added the breaking-change This pull request has breaking changes. They should be described in PR description. label Apr 3, 2023
ronensc
ronensc previously approved these changes May 9, 2023
Copy link
Collaborator

@ronensc ronensc left a 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 Show resolved Hide resolved
@@ -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"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added

Copy link
Collaborator

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)

Copy link
Collaborator Author

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,
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think its OK.

@openshift-ci openshift-ci bot added the lgtm label May 11, 2023
@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label May 11, 2023
@github-actions
Copy link

New image: quay.io/netobserv/flowlogs-pipeline:073a2ed. It will expire after two weeks.

@KalmanMeth KalmanMeth merged commit ca6de5c into netobserv:main May 14, 2023
@ronensc ronensc mentioned this pull request Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change This pull request has breaking changes. They should be described in PR description. lgtm ok-to-test To set manually when a PR is safe to test. Triggers image build on PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make aggregates timeout configurable
3 participants