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

⚠️ Fix object logging in ResourceHasFilterLabel, ResourceNotPaused & ResourceNotPausedAndHasFilterLabel predicates #11188

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

Karthik-K-N
Copy link
Contributor

@Karthik-K-N Karthik-K-N commented Sep 17, 2024

What this PR does / why we need it:

Main motivation of this PR is to log resource kind in predicate logs, In order to accommodate change we need to change the signature of predicates.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #10818

/area utils

@k8s-ci-robot
Copy link
Contributor

@Karthik-K-N: The label(s) area/utils cannot be applied, because the repository doesn't have them.

In response to this:

What this PR does / why we need it:

Main motivation of this PR is to log resource kind in predicate logs, In order to accommodate change we need to change the signature of predicates.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #10818

/area utils

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 17, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/needs-area PR is missing an area label label Sep 17, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 17, 2024
@Karthik-K-N
Copy link
Contributor Author

@sbueringer I have made changes starting with ResourceNotPaused and ResourceHasFilterLabel predicates, I also ended up changing signature of external.Watch() to take scheme as parameter, Please take a look when you get chance. Thank you.

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

Thx! Overall looks good, just some minor findings

controllers/external/tracker.go Outdated Show resolved Hide resolved
controllers/external/tracker.go Outdated Show resolved Hide resolved
Copy link
Contributor Author

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

Made changes as suggested, have couple of queries please take a look when you get time. Thanks

controllers/external/tracker.go Show resolved Hide resolved
controllers/external/tracker_test.go Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

@Karthik-K-N: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-apidiff-main f8e6c0b link false /test pull-cluster-api-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@sbueringer sbueringer changed the title 🌱 Log resource kind in predicate logs ⚠️ Fix object logging in ResourceHasFilterLabel, ResourceNotPaused & ResourceNotPausedAndHasFilterLabel predicates Sep 19, 2024
@sbueringer
Copy link
Member

Thank you!

/lgtm

/assign @fabriziopandini @chrischdi

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

LGTM label has been added.

Git tree hash: 8c85f84914e650d225e4e030968cd2164c28e8e8

@sbueringer sbueringer added the area/util Issues or PRs related to utils label Sep 19, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-area PR is missing an area label label Sep 19, 2024
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

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 Sep 26, 2024
@k8s-ci-robot k8s-ci-robot merged commit 8c4c67b into kubernetes-sigs:main Sep 26, 2024
28 of 29 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Sep 26, 2024
@sbueringer sbueringer mentioned this pull request Sep 27, 2024
2 tasks
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/util Issues or PRs related to utils 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants