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

🌱 Move Predicates allow logs to V6 #5148

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
Currently in Cluster API, when log is >=4, predicates start reporting several logs entries reporting:

  1. When an object reconciliation is blocked by predicates
  2. When an object reconciliation is allowed by predicates
  3. How predicates combines via Any or All

This is really chatty given that we are using predicates in many places, and it makes reading Cluster API log hard/difficult to use log levels >=4.

This PR implement a solution for this problem by moving logs of category 2 and 3 to v6, while instead "object reconciliation being blocked by predicates" will continue to be logger at v4.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 24, 2021
@k8s-ci-robot k8s-ci-robot requested a review from enxebre August 24, 2021 19:19
return true
}
}
log.V(4).Info("All of the provided predicates returned false, blocking further processing")
log.V(6).Info("All of the provided predicates returned false, blocking further processing")
Copy link
Member

Choose a reason for hiding this comment

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

I might have misunderstood the PR description, but shouldn't those stay at 4?

My tl;dr was every blocking predicate (i.e. logs in combination with return false) should stay at 4.

Or only a subset of those?

Copy link
Member Author

Choose a reason for hiding this comment

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

@sbueringer those are log entry from All and Any, which provides combinations of predicates (the point number 3 in the PR discription); they should be moved at level 6 because they are "echoing" blocking predicates logs from other predicates (they are redundant).

Copy link
Member

Choose a reason for hiding this comment

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

Okay perfect, thx for the explanation!

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 24, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

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 Aug 24, 2021
@fabriziopandini
Copy link
Member Author

/hold
checking @sbueringer comment

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Aug 24, 2021
@k8s-ci-robot k8s-ci-robot merged commit 103997d into kubernetes-sigs:master Aug 24, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone Aug 24, 2021
@fabriziopandini
Copy link
Member Author

hold canceled
as per #5148 (comment)

@fabriziopandini fabriziopandini deleted the move-predicates-pass-logs-to-v6 branch August 24, 2021 19:36
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants