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
Fix kubevirt_vmi_phase_count not being created #10001
Fix kubevirt_vmi_phase_count not being created #10001
Conversation
/cc |
@@ -250,7 +250,7 @@ func (co *VMICollector) updateVMIsPhase(vmis []*k6tv1.VirtualMachineInstance, ch | |||
mv, err := prometheus.NewConstMetric( | |||
vmiCountDesc, prometheus.GaugeValue, | |||
float64(count), | |||
vmc.NodeName, vmc.Phase, vmc.OS, vmc.Workload, vmc.Flavor, vmc.InstanceType, | |||
vmc.NodeName, vmc.Phase, vmc.OS, vmc.Workload, vmc.Flavor, vmc.InstanceType, vmc.Preference, |
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.
Can you please elaborate on why the absence of vmc.Preference
caused the metric to not be pushed and not to be collected?
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.
NewConstMetric
was throwing an error saying the number of labels set in vmiCountDesc
and the number of labels used as arguments differed. The issue was being logged.
Also, the unit tests were incomplete, testing only the reading of the VMIs details, and were missing the creation of the metric
09374fb
to
9fb57e3
Compare
Signed-off-by: João Vilaça <jvilaca@redhat.com>
9fb57e3
to
dc57225
Compare
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enp0s3 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 |
/cherry-pick release-1.0 |
@machadovilaca: new pull request created: #10051 In response to this:
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/test-infra repository. |
/cherry-pick release-0.59 |
1 similar comment
/cherry-pick release-0.59 |
@machadovilaca: new pull request created: #10483 In response to this:
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/test-infra repository. |
What this PR does / why we need it:
kubevirt_vmi_phase_count was not being created because a label was missing
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 https://bugzilla.redhat.com/show_bug.cgi?id=2211512
Special notes for your reviewer:
Release note: