Skip to content

Conversation

@rioloc
Copy link
Member

@rioloc rioloc commented Dec 10, 2025

This PR introduces the following changes:

ALERTS expression simplified

  • The previous expression used as query param in the query_range endpoint is simplified as
    ALERTS{} . The second half of the query, + on () group_left (component, layer) (absent(meta{layer="${query.layer}", component="${query.component}"}))), was removed because component and layer labels are already present in the incident entity.

Split of query_range request into multiple ones for long queries

  • When the query expression, composed by several ALERTS{} joined via or condition, exceeds a MAX_URL_LENGTH limit, then several queries will be created instead.
  • The fetchDataForIncidentsAndAlerts was updated to support both single and multiple queries. In the case of multiple queries then multiple requests will be triggered to the Prometheus API.

Assisted-By: Claude Code

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 10, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 10, 2025

@rioloc: This pull request references OU-632 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.21.0" version, but no target version was set.

In response to this:

This PR introduces the following changes:

ALERTS expression simplified

  • The previous expression used as query param in the query_range endpoint is simplified as
    ALERTS{} . The second half of the query, + on () group_left (component, layer) (absent(meta{layer="${query.layer}", component="${query.component}"}))), was removed because component and layer labels are already present in the incident entity.

Split of query_range request into multiple ones for long queries

  • When the query expression, composed by several ALERTS{} joined via or condition, exceeds a MAX_URL_LENGTH limit, then several queries will be created instead.
  • The fetchDataForIncidentsAndAlerts was updated to support both single and multiple queries. In the case of multiple queries then multiple requests will be triggered to the Prometheus API.

Assisted-By: Claude Code

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 10, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rioloc
Once this PR has been reviewed and has the lgtm label, please assign etmurasaki for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@rioloc rioloc force-pushed the feat/split_query_range_requests branch from 1b594e8 to 7ca9eb0 Compare December 10, 2025 16:30
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 10, 2025

@rioloc: The following test 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/lint 1b594e8 link true /test lint

Full PR test history. Your PR dashboard.

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

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants