Skip to content

Fix kubevirt_memory_delta_from_requested_bytes to the new name, and upgrade metrics linter #4123

Open
avlitman wants to merge 2 commits intokubevirt:mainfrom
avlitman:fix-cnv-abnormal
Open

Fix kubevirt_memory_delta_from_requested_bytes to the new name, and upgrade metrics linter #4123
avlitman wants to merge 2 commits intokubevirt:mainfrom
avlitman:fix-cnv-abnormal

Conversation

@avlitman
Copy link
Copy Markdown
Collaborator

@avlitman avlitman commented Mar 25, 2026

In kubevirt/kubevirt#17065 kubevirt_memory_delta_from_requested_bytes is deprecated and replaced by container:kubevirt_memory_delta_from_requested_bytes:max. This pr fix cnv_abnormal expression to use the new name.

*This pr also upgrade the linter version to be able to remove cluster:vmi_request_cpu_cores:sum and excluded list.

Release note:

none

@kubevirt-bot kubevirt-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 Mar 25, 2026
@kubevirt-bot kubevirt-bot requested review from nunnatsa and orenc1 March 25, 2026 10:31
@avlitman
Copy link
Copy Markdown
Collaborator Author

/hold

until kubevirt/kubevirt#17065 is merged

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 25, 2026
@kubevirt-bot
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 orenc1 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

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

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:

  • With the switch to container:kubevirt_memory_delta_from_requested_bytes:max, ensure the metric still exposes container and reason labels; if the label set differs from the deprecated metric, the sum by (container, reason) expression may need to be adjusted accordingly.
  • Now that excludedMetrics is always empty, consider removing the map entirely or documenting when and how entries should be added in the future to avoid dead or confusing configuration.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- With the switch to `container:kubevirt_memory_delta_from_requested_bytes:max`, ensure the metric still exposes `container` and `reason` labels; if the label set differs from the deprecated metric, the `sum by (container, reason)` expression may need to be adjusted accordingly.
- Now that `excludedMetrics` is always empty, consider removing the map entirely or documenting when and how entries should be added in the future to avoid dead or confusing configuration.

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.

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Mar 25, 2026

Pull Request Test Coverage Report for Build 23591379017

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 80.055%

Totals Coverage Status
Change from base Build 23588631420: 0.0%
Covered Lines: 10388
Relevant Lines: 12976

💛 - Coveralls

@avlitman
Copy link
Copy Markdown
Collaborator Author

/unhold

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 26, 2026
@hco-bot
Copy link
Copy Markdown
Collaborator

hco-bot commented Mar 26, 2026

hco-e2e-kv-smoke-gcp lane succeeded.
/override ci/prow/hco-e2e-kv-smoke-azure
hco-e2e-consecutive-operator-sdk-upgrades-azure lane succeeded.
/override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-aws
hco-e2e-operator-sdk-gcp, hco-e2e-operator-sdk-azure lanes succeeded.
/override ci/prow/hco-e2e-operator-sdk-aws
hco-e2e-upgrade-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-aws
hco-e2e-upgrade-prev-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws
hco-e2e-upgrade-prev-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws
hco-e2e-upgrade-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws

@kubevirt-bot
Copy link
Copy Markdown
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-aws, ci/prow/hco-e2e-kv-smoke-azure, ci/prow/hco-e2e-operator-sdk-aws, ci/prow/hco-e2e-upgrade-operator-sdk-aws, ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws, ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws, ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws

Details

In response to this:

hco-e2e-kv-smoke-gcp lane succeeded.
/override ci/prow/hco-e2e-kv-smoke-azure
hco-e2e-consecutive-operator-sdk-upgrades-azure lane succeeded.
/override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-aws
hco-e2e-operator-sdk-gcp, hco-e2e-operator-sdk-azure lanes succeeded.
/override ci/prow/hco-e2e-operator-sdk-aws
hco-e2e-upgrade-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-aws
hco-e2e-upgrade-prev-operator-sdk-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws
hco-e2e-upgrade-prev-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws
hco-e2e-upgrade-operator-sdk-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws

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.

@avlitman avlitman changed the title Fix cnv abnormal Fix kubevirt_memory_delta_from_requested_bytes to the new name, and upgrade metrics linter Mar 26, 2026
Signed-off-by: avlitman <alitman@redhat.com>
Made-with: Cursor
Signed-off-by: avlitman <alitman@redhat.com>
@sonarqubecloud
Copy link
Copy Markdown

@avlitman
Copy link
Copy Markdown
Collaborator Author

/hold until hco will be able to get kubevirt version with the fix

CC @nunnatsa

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 26, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 26, 2026

@avlitman: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws 4c27da4 link true /test hco-e2e-upgrade-prev-operator-sdk-aws
ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure 4c27da4 link false /test hco-e2e-upgrade-prev-operator-sdk-sno-azure
ci/prow/hco-e2e-kv-smoke-azure 4c27da4 link true /test hco-e2e-kv-smoke-azure
ci/prow/hco-e2e-upgrade-operator-sdk-azure 4c27da4 link true /test hco-e2e-upgrade-operator-sdk-azure
ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure 4c27da4 link false /test hco-e2e-upgrade-operator-sdk-sno-azure
ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws 4c27da4 link false /test hco-e2e-upgrade-operator-sdk-sno-aws
ci/prow/hco-e2e-upgrade-operator-sdk-aws 4c27da4 link true /test hco-e2e-upgrade-operator-sdk-aws
ci/prow/hco-e2e-operator-sdk-aws 4c27da4 link true /test hco-e2e-operator-sdk-aws
ci/prow/hco-e2e-operator-sdk-sno-aws 4c27da4 link false /test hco-e2e-operator-sdk-sno-aws
ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-aws 4c27da4 link true /test hco-e2e-consecutive-operator-sdk-upgrades-aws
ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws 4c27da4 link false /test hco-e2e-upgrade-prev-operator-sdk-sno-aws

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note-none Denotes a PR that doesn't merit a release note. size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants