Skip to content

Fix cluster quota handler registration - #210

Open
vishnubijukumar wants to merge 2 commits into
kubevirt:mainfrom
vishnubijukumar:fix-handler-registration-errors
Open

Fix cluster quota handler registration#210
vishnubijukumar wants to merge 2 commits into
kubevirt:mainfrom
vishnubijukumar:fix-handler-registration-errors

Conversation

@vishnubijukumar

Copy link
Copy Markdown

What this PR does / why we need it:
Fail fast when cluster quota controller event handler registration fails, instead of silently continuing with a partially initialized controller.

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:
This updates the CRQ and AACRQ controller constructors to stop ignoring informer handler registration errors.
It also adds focused constructor tests for both controllers and fixes adjacent Infof usage in the touched files so the package tests pass.

Release note:

NONE

@kubevirt-prow kubevirt-prow Bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Aug 21, 2026
@kubevirt-prow

kubevirt-prow Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Hi @vishnubijukumar. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

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.

@kubevirt-prow

kubevirt-prow Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

[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 assign barakmor1 for approval. For more information see the Code Review Process.

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-prow kubevirt-prow Bot added the size/M label Aug 21, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Instead of panicking with a fixed string in the controller constructors, consider including the underlying error in the panic message (or returning it) to aid debugging when handler registration fails.
  • The erroringSharedIndexInformer test helper is duplicated in both constructor test files; consider moving it into a shared test utility to avoid repetition and keep behavior consistent.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Instead of panicking with a fixed string in the controller constructors, consider including the underlying error in the panic message (or returning it) to aid debugging when handler registration fails.
- The `erroringSharedIndexInformer` test helper is duplicated in both constructor test files; consider moving it into a shared test utility to avoid repetition and keep behavior consistent.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Signed-off-by: Vishnu Bijukumar <vishnubijukumar@ibm.com>
Signed-off-by: Vishnu Bijukumar <vishnubijukumar@ibm.com>
@vishnubijukumar
vishnubijukumar force-pushed the fix-handler-registration-errors branch from 9333b4b to ae9536e Compare August 21, 2026 09:31
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. release-note-none Denotes a PR that doesn't merit a release note. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant