Skip to content

Avoid hotloop over empty clusterrole rules#28

Open
akalenyu wants to merge 1 commit intokubevirt:masterfrom
akalenyu:event-spam-empty-rules
Open

Avoid hotloop over empty clusterrole rules#28
akalenyu wants to merge 1 commit intokubevirt:masterfrom
akalenyu:event-spam-empty-rules

Conversation

@akalenyu
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
For an empty list, we get in a hotloop over it being persisted with nil

2026-01-14T04:29:20Z	INFO	DIFF	{"controller": "migcontroller-controller", "object": {"name":"migcontroller-kubevirt-hyperconverged","namespace":"openshift-cnv"}, "namespace": "openshift-cnv", "name": "migcontroller-kubevirt-hyperconverged", "reconcileID": "d5cabc29-c944-4271-8b88-b5284c55c266", "obj": {"apiVersion": "rbac.authorization.k8s.io/v1", "kind": "ClusterRole", "name": "migrations.kubevirt.io:admin"}, "patch": "[{\"op\":\"add\",\"path\":\"/rules\",\"value\":[]}]"}

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 #

Special notes for your reviewer:

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note:

BugFix: event spam over rbac update

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/S labels Jan 15, 2026
For an empty list, we get in a hotloop over it being persisted with nil
```
2026-01-14T04:29:20Z	INFO	DIFF	{"controller": "migcontroller-controller", "object": {"name":"migcontroller-kubevirt-hyperconverged","namespace":"openshift-cnv"}, "namespace": "openshift-cnv", "name": "migcontroller-kubevirt-hyperconverged", "reconcileID": "d5cabc29-c944-4271-8b88-b5284c55c266", "obj": {"apiVersion": "rbac.authorization.k8s.io/v1", "kind": "ClusterRole", "name": "migrations.kubevirt.io:admin"}, "patch": "[{\"op\":\"add\",\"path\":\"/rules\",\"value\":[]}]"}
```

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
@akalenyu akalenyu force-pushed the event-spam-empty-rules branch from 4cf993b to dc4253f Compare January 15, 2026 10:53
Copy link
Copy Markdown

@maiqueb maiqueb left a comment

Choose a reason for hiding this comment

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

tks

@kubevirt-bot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akalenyu, maiqueb

The full list of commands accepted by this bot can be found here.

Details 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

@kubevirt-bot
Copy link
Copy Markdown

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 15, 2026
@kubevirt-bot
Copy link
Copy Markdown

There has been no activity on this PR for 59 days and it has been stale for 14 days.
To protect limited CI resources, it has been automatically labelled 'rotten' and will be closed in 7 days.

What you can do:

  • If the PR is waiting on you to respond to a question or feedback and/or update the PR, please do so.
  • You can mark the PR as fresh and remove the label with the following command: /remove-lifecycle rotten
  • If this PR is safe to close now, please help the project by closing it with: /close
  • If you need attention on this PR from a reviewer, you can raise it on the agenda of the relevant SIG meeting or KubeVirt Community meeting, or ping the kubevirt-dev slack channel.

/lifecycle rotten

@kubevirt-bot kubevirt-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants