OCPBUGS-100435: Fix ListenerSet metric registry and add metric e2e verification - #1534
OCPBUGS-100435: Fix ListenerSet metric registry and add metric e2e verification#1534gcs278 wants to merge 2 commits into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@gcs278: This pull request explicitly references no jira issue. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Skipping CI for Draft Pull Request. |
|
/test e2e-aws-operator |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
e94d967 to
a0df180
Compare
|
ah darn missing a |
|
/test e2e-aws-operator |
|
@gcs278: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
ff293f4 to
3f97a4a
Compare
The metric was registered with prometheus.Register() (the default global registry) instead of ctrlruntimemetrics.Registry.Register() (the controller-runtime registry that the operator's metrics server serves). This caused the metric to never appear in Prometheus scrapes despite being set correctly by the controller. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds metric checks to testListenerSetNotAccepted: - Verifies ingress_operator_listenerset_on_managed_gateway is set to 1 - Verifies metric is cleaned up after ListenerSet deletion - Includes debug logging to diagnose CI environment issues: - Dumps all listenerset metrics before targeted query - Logs the exact query string being used - Logs metric labels and values when found Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3f97a4a to
24b47f4
Compare
|
@gcs278: This pull request references Jira Issue OCPBUGS-100435, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
PR needs rebase. DetailsInstructions 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. |
Summary
Fixes the
ingress_operator_listenerset_on_managed_gatewayPrometheus metric to use the controller-runtime metrics registry instead of the default global Prometheus registry. After the metrics server migration (NE-2742), only metrics onctrlruntimemetrics.Registryare served — the listenerset metric was being set correctly but never appeared in Prometheus.Also adds e2e test coverage verifying the metric is set and cleaned up properly.
Changes
prometheus.Register()withctrlruntimemetrics.Registry.Register()inpkg/operator/controller/listenerset-status/controller.goassertMetricValueandassertMetricGonehelpers to verify the Prometheus metric lifecycle intestListenerSetNotAcceptedTest plan
testListenerSetNotAcceptede2e passes — metric value is 1 when ListenerSet targets a managed GatewayListenerSetOnManagedGatewayalert fires in the console when a ListenerSet targets a managed GatewayBug: https://issues.redhat.com/browse/OCPBUGS-100435
🤖 Generated with Claude Code