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

[release-v0.18] Fix VirtualMachineCRCErrors not stop firing #907

Conversation

machadovilaca
Copy link
Member

@machadovilaca machadovilaca commented Mar 4, 2024

This is a manual cherry-pick of #742

https://issues.redhat.com/browse/CNV-35848

Release note:

Fix VirtualMachineCRCErrors not stop firing

The controller keeps reporting old metric values
even after the VM is deleted. This commit updates
the metric name and labels so that we can set up
the metric value to 0, and no longer trigger the
alert on VM deletion

Signed-off-by: João Vilaça <jvilaca@redhat.com>
Signed-off-by: João Vilaça <jvilaca@redhat.com>
@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. labels Mar 4, 2024
Signed-off-by: João Vilaça <jvilaca@redhat.com>
@0xFelix
Copy link
Member

0xFelix commented Mar 5, 2024

@machadovilaca Looks like the e2e test you introduced with this PR is failing?

Signed-off-by: João Vilaça <jvilaca@redhat.com>
Copy link

sonarcloud bot commented Mar 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
4.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@@ -287,7 +286,7 @@ var _ = Describe("Prometheus Alerts", func() {

Eventually(func(g Gomega) error {
return apiClient.Get(ctx, types.NamespacedName{Name: vmName, Namespace: strategy.GetNamespace()}, vm)
}).Should(MatchError(k8serrors.IsNotFound))
Copy link
Member

Choose a reason for hiding this comment

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

IIRC this syntax is just missing a string as second argument

e.g.

Should(MatchError(k8serrors.IsNotFound, "IsNotFound"))

Copy link
Member Author

Choose a reason for hiding this comment

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

that is what we have in main branch, but that caused the automatic cherry-pick to fail. Probably here we have an older version of gomega

Copy link
Member

Choose a reason for hiding this comment

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

ACK

Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2024
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 0xFelix

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 5, 2024
@kubevirt-bot kubevirt-bot merged commit 5abc81a into kubevirt:release-v0.18 Mar 5, 2024
11 checks passed
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants