-
Notifications
You must be signed in to change notification settings - Fork 136
[kubevirt-operator] Revert incorrect case change in VM alerts #1804
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
Conversation
Revert PR #1770 which incorrectly changed status check from lowercase to uppercase. The actual metrics use lowercase: - kubevirt_vm_info uses status="running" (not "Running") - kubevirt_vmi_info uses phase="running" (not "Running") Verified by querying virt-controller metrics in instories cluster. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughA configuration file for KubeVirt operator alert rules was modified to change PromQL filter values from uppercase to lowercase. The changes affect status and phase condition comparisons in VM and VMI alert rules. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @lexfrei, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an issue where the case of status and phase checks in VM alerts was incorrectly changed to uppercase. By reverting these changes, the alert rules now correctly use lowercase values, aligning with the actual KubeVirt metrics. This ensures that the alerts function as intended and accurately reflect the status of virtual machines. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This PR correctly fixes the casing for status/phase values in the KubeVirt Prometheus alert rules. This is an important correctness fix. I've also added a couple of comments with suggestions to improve the alert logic to prevent false positives and make the alerts more precise. These are significant issues that could cause alert fatigue, so I recommend addressing them, either in this PR or a follow-up.
|
Successfully created backport PR for |
|
Successfully created backport PR for |
## What this PR does Reverts PR #1770 which incorrectly changed status/phase checks from lowercase to uppercase. The actual KubeVirt metrics use **lowercase**: - `kubevirt_vm_info` uses `status="running"` (not `"Running"`) - `kubevirt_vmi_info` uses `phase="running"` (not `"Running"`) ### Verification Queried virt-controller metrics directly in the instories cluster: ``` kubevirt_vm_info{...,status="running",status_group="running",...} 1 kubevirt_vmi_info{...,phase="running",...} 1 ``` Note: `kubectl get vm` shows `STATUS: Running` with capital R, but this is display formatting — the actual metric labels use lowercase. ### Release note ```release-note [kubevirt-operator] Fix VM alert rules to use correct lowercase status values ```
## What this PR does Reverts PR #1770 which incorrectly changed status/phase checks from lowercase to uppercase. The actual KubeVirt metrics use **lowercase**: - `kubevirt_vm_info` uses `status="running"` (not `"Running"`) - `kubevirt_vmi_info` uses `phase="running"` (not `"Running"`) ### Verification Queried virt-controller metrics directly in the instories cluster: ``` kubevirt_vm_info{...,status="running",status_group="running",...} 1 kubevirt_vmi_info{...,phase="running",...} 1 ``` Note: `kubectl get vm` shows `STATUS: Running` with capital R, but this is display formatting — the actual metric labels use lowercase. ### Release note ```release-note [kubevirt-operator] Fix VM alert rules to use correct lowercase status values ```
## What this PR does Reverts PR #1770 which incorrectly changed status/phase checks from lowercase to uppercase. The actual KubeVirt metrics use **lowercase**: - `kubevirt_vm_info` uses `status="running"` (not `"Running"`) - `kubevirt_vmi_info` uses `phase="running"` (not `"Running"`) ### Verification Queried virt-controller metrics directly in the instories cluster: ``` kubevirt_vm_info{...,status="running",status_group="running",...} 1 kubevirt_vmi_info{...,phase="running",...} 1 ``` Note: `kubectl get vm` shows `STATUS: Running` with capital R, but this is display formatting — the actual metric labels use lowercase. ### Release note ```release-note [kubevirt-operator] Fix VM alert rules to use correct lowercase status values ```
What this PR does
Reverts PR #1770 which incorrectly changed status/phase checks from lowercase to uppercase.
The actual KubeVirt metrics use lowercase:
kubevirt_vm_infousesstatus="running"(not"Running")kubevirt_vmi_infousesphase="running"(not"Running")Verification
Queried virt-controller metrics directly in cluster:
Note:
kubectl get vmshowsSTATUS: Runningwith capital R, but this is display formatting — the actual metric labels use lowercase.Release note
Summary by CodeRabbit
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.