Skip to content

Conversation

@kisieland
Copy link
Contributor

To avoid excesive logging of the HintingSimulator we should use klogx to cap the number of logged lines depending on the verbosity level.

Which component this PR applies to?

Cluster Autoscaler

/kind bug

What this PR does / why we need it:

Uses klogx to cap the number of log lines logged by the Hinting Simulator.
This avoids excessive logging.

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Cap number of log lines by the HintingSimulator.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 22, 2022
@k8s-ci-robot k8s-ci-robot requested a review from x13n December 22, 2022 11:28
break
}
}
klogx.V(4).Over(loggingQuota).Infof("There were also %v other logs that were capped.", -loggingQuota.Left())
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Maybe clarify what kind of logs, or include some other more precise info (e.g. prefix with the name of the function). Log lines from other goroutines could get inserted in between and then it'd be hard to know what this line refers to.

@towca towca requested review from towca and removed request for feiskyer and x13n January 4, 2023 14:12
@towca
Copy link
Collaborator

towca commented Jan 4, 2023

/assign @towca
/lgtm
/approve
/hold

Feel free to unhold if you disagree with the nit.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 4, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 4, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kisieland, towca

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 4, 2023
To avoid excesive logging of the HintingSimulator we should use klogx
to cap the number of logged lines depending on the verbosity level.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 5, 2023
@kisieland
Copy link
Contributor Author

kisieland commented Jan 5, 2023

@towca makes sense, added clarification. PTAL

@towca
Copy link
Collaborator

towca commented Jan 5, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 5, 2023
@towca
Copy link
Collaborator

towca commented Jan 5, 2023

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 5, 2023
@k8s-ci-robot k8s-ci-robot merged commit a8dd08a into kubernetes:master Jan 5, 2023
@kisieland kisieland deleted the hinting-sim-klogx branch January 5, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants